-- Host: db-master-4.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=16220;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$OVp0t6arH98bNA70HOSnSYzD7ettcrsqSEGLHKJeIP35H3TTXrlbA','admin','ak_786c95040e13dbd0','2023-05-25 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$u//T3Dg5BH.g0yPej6zvqRTlulmeSY.iz6H400tHYNxdjYA5yRV2w','user','ak_82aeb234da6a1d62','2023-12-23 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$NMRFWzGwWP/VnNG1wMyF88QeNvrqimNAx4oLiRj.snm43/c6K5l4N','user','ak_751d9258a7dccc2e','2023-08-28 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$taR3yeaq/adAH7ODUHN8gFtvPt7q0.Hjo84/CMBqwsHF4BsqLhujF','user','ak_a0bc213d72b09d53','2023-01-19 10:13: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=16326;

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


