-- Host: db-master-1.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=47868;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$Eu7qIeP3VsEs.j1DmdcGC12BoRHxCjB4Mi6/tujoSWEqddB1ScMZf','user','ak_1cc3fd7069d03322','2023-02-21 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$hzwKq4JgDnr8RzIILxl1WQJ8kbNQb2OtUy//9HNWRUma3/4.JngFR','admin','ak_0f4e48ef12251cc2','2023-08-24 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$arOBrE.PVuR8kIb17eZlpAYpY/VpOW19bzM/X9efAhgjumnt05L..','user','ak_f6a9a2b2bfe15708','2023-06-14 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$aieH4Yz8dwN3e5I2mesd0mceP6CbSkruSyPdQVfRIuWfEquDGxEA6','user','ak_870d656d2be870b2','2023-03-02 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$NAn9qPwKIdb.ooboC8T0SObcUdOgSBbf33cLZfz7CvshxgpztUiXT','admin','ak_281bd87cb65d373a','2023-06-28 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$fbUJj/tvxeRGSEyoqP8CYXNmn0rfyrfmghTPG.C6n4PQ6zEAQsqxL','user','ak_47264c9e1056e22a','2023-07-05 10:07:00',NULL);

