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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$Mlv7USdwX7DqmeOjknRvwo0FZaq9Pj8f0lj9bLW5P4VvhWdOofn2i','user','ak_ff706b3e85262e45','2023-07-06 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$S462XFpyhypmgnkpOHFnU0bk/RzTpAGNVpP6aSa.QyyT9goPlv9R/','admin','ak_a37b303edc21d9de','2023-08-17 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$Wyx3uzBsUjYoZq5a7Q17ZxKJadTD8bBgO32M6MEC8f2FFDWpGfq4c','admin','ak_61f389ea617bc356','2023-07-18 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$W7p4PdqC2ldiXaehvYj9/Zfli5zPHHd1K0MHYmIqhHImaDdRiuyOy','admin','ak_7ec25d8de4985a33','2023-09-08 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$PhIGCHhTkUMroSsxUDGHfiVyO/8P61Sc9AxaZm5WptXAXvwUITCkH','user','ak_13f6e31d275a130f','2023-05-20 10:20: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=6347;

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


