-- Host: db-master-0.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=11530;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$aeELQ7Ww6oXLIXyNZOZe.RbatgATpS7mGvDT9HJLOxuQpj53uNnY6','admin','ak_44c0348aa97f31ef','2023-05-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$K0frLqlVRI0VA98a.xpRzqwYik.S5zlyOy24V5BmlQoYUsShdDPTf','user','ak_eb02fd58d61a83f7','2023-07-10 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$TQ60Vc3Q62QHrUIBlofprs.KFYljOMGTonLvSmvCmMoIrJW99LK3N','user','ak_668c70d88fa8387f','2023-04-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$QyK/EOd.Skr1ODymg2LZbRrXSNzwyIPUw4G5VRsyVifiVbkR79lVL','user','ak_893cc1851e4a9b98','2023-11-06 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$N.jMR1NUidM9yrLC1pDRlpzSTPDUfr8jyp4LKOKCA0kFXGVWrnPtq','user','ak_50ecbe26ba5c6557','2023-03-16 10:06:00',NULL);

