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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$K5gfLo92m.RKh85SA5lSqJYMx9L41nigPwMrNKsZSJpbuLp8s5y6x','user','ak_e12c1485d04c1b1b','2023-11-27 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$WvL2lZcbzHmzRMdlMC1JTh2riOewOVOnwAAhDmzCMxQ1pe4AgqBA8','user','ak_51b9d476a5664592','2023-11-19 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$G9bm2s/pJrSQF90VhWtJMevsP8IJ31t8qgTP0MAHKNV9DEg5H7l4k','user','ak_91e39215cd85b7e6','2023-08-06 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$2cOSiv6PkPawXr3At8X6EM5W61FdWbFh5Cdqu/wKnznnk/Rq3FHk5','user','ak_977db2d095f43f07','2023-09-14 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$Gpb7VA7wZUSTAqpiR2EFwBAB8sshCryK5BoJ4gFf5r5c8ou7he0/a','admin','ak_82b9de25ebca2642','2023-01-18 10:19: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=39248;

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


