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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$PiHehFCbpEpptIGtlkm1sQ8AWvTdMpRSlNn3e4gdmsluT8mpHKPw9','user','ak_0f778a131ce0261a','2023-12-07 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$6QfW/3VE.Qg.PzfbNvGPU1etk4cDLMDJDgZcjsZUU4kGU5qbF8jf8','user','ak_b792ac86e2755e63','2023-08-09 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$YuSLCpgRMvy3WBshaHCKsq3DCR7Y05NHt.CvXzTEAP0wnDdmhPzXb','admin','ak_277b5098bdfaf9d7','2023-08-22 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$ccyIsmOoYeEUJ3/6Xy1QGBmxPEHIbC6tdHOQne6Ddu15HzrmaVK.8','user','ak_2c6d151826873a53','2023-11-12 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$DgCuOitbSoLMMJqknwLT73ouBNVXXVm2J7t/7ERXkSRoqd6nB8fq6','user','ak_64c31a99836d1911','2023-04-14 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$z/NkxIhNpajTzUAbDbJBJCxlI5.JDxW/afhmZnN8fU3KQGNetqxi9','user','ak_46089589cb5b6ab0','2023-11-18 10:16:00',NULL);

