-- Host: db-master-3.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=47609;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$tP0W2MmcZw28mmritr1WC1/9hfthoYLMGSKEkCUEPia4.mwXrJr6o','user','ak_0c01ffd42b15afa3','2023-04-21 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$mxaYB1Lf98.RNWOEmFvkPGrZZrgC2q7W3sfqONwWvFMnq170m921R','admin','ak_cc3e70aa66217b72','2023-01-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$ixMb42yzSw4Egwg1.brSOjGHk4cJiYQsf431bQu0BK1WOlSyiD8oU','user','ak_f0925d15d4a795d9','2023-12-01 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$PlvesgMdIcCl6AAZFLwIwc6zGHFZnjKjew.KyHnwytRolfQS/Hy33','user','ak_a05417a8e2d4fb06','2023-02-16 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$g0Z8ihKXXZ03Wgmgn3YGsjTkxS8dRlC277zxTeNXDlIF9mzTUL8ZG','user','ak_6fb2d1a864aad335','2023-05-15 10:20:00',NULL);

