-- Host: db-master-8.internal    Database: ecommerce


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16614;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=44215;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$kneMHg/LC6OqJMuepf4.CmJgwCRT726D.rFufUxXCPhSsFwEede7f','user','ak_0ca3dd2f123360f1','2023-10-12 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$UOpVW.ua6ZA9nMF5g1HNwotwR0CCkOd9C/Mi1pcQT9a4otyzQCQ9y','admin','ak_727bb918765ab02b','2023-05-23 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Nw/yur13fTjlMn.WPxOoFd0k8ioKMFDDwloFMTlFKaAFRmA9CGgZh','admin','ak_9226603456b7b7bd','2023-03-21 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$HCFy8xlOU7hGPfC6oJ9oTmGW0dlImss1Rk2U5dvRfHUaSm8i7PZH/','user','ak_ae85307622d42621','2023-03-27 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$7FYl9eqCdj0Wt18UDWXrrUOdqnxrTSJgAowrAcvNBdteaPE02wY0I','user','ak_00076cbb0bf570b3','2023-09-14 10:18:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=32320;

--
-- Dumping data for table `orders`
--


