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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$W/Z.1FgBt4BVbdCG6Wl7Vf/vvfBgKudRzfEM65PuBHpw6J7HPyV04','user','ak_c132832f80643c1c','2023-12-13 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$FGDznsizvj/nXOEuZ076cQYXA9CMBZAJCKcDwYqIJETvefP7lYYQP','admin','ak_46c24c56d7735d39','2023-07-26 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$xCWo/1aLho//cKTOEjxGLNIg7csgRxEOSyB/9FY8kf9FwSqRJ8Q6h','user','ak_669edeacdb2f88ef','2023-09-20 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$1OSH8RYTDRnA9HzHdcFSxCwCP4pZSQ47PMj.bJtI2I4/EfKiNroK0','user','ak_1db94bc00d8aa5ce','2023-11-26 10:14:00',NULL);

