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


--
-- 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=5177;

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$JqYUlpvgbZ6UCW/y3wGo9BUteOZvkVwvXumMljTGnomrSZk2Zh67X','user','ak_c281099449b3665e','2023-09-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$pxieDIUpj39c4IIr858lnsLYzRN/EhPo2HqiRIwAH9RaKRrlBYwuK','user','ak_475101277a538a10','2023-08-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$89yPSgzMgH144oxfNsdao4N6WtM96/YvyczHgkug9VcSfBnoERZJm','admin','ak_a15776a6b193a4ae','2023-08-21 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$yimuiL/d9K8MKPdUSVU9j5pTfbShNwsMi868nXsT3mUWXGVO8GRr5','user','ak_614b1ec998bf7de6','2023-06-17 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$M1JQQmctlRROVuttRJmRCG9Rp0ahqk/IUH/EsmO8SOojHoCwu/V7t','user','ak_e79de260a8451c06','2023-09-21 10:10: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=6452;

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


