-- Host: db-master-2.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=20078;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$LsI2S8bf4zWcbk18.zmmXTBS7C5ixyi.lxdG1XFlBmR0hLG0S8Coh','user','ak_fe9b2ba211ca73b8','2023-05-05 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$TW27S5/4atsfLxCPyMRalSslH85MPIw9me7k1i83Glq4LzwNATNiL','user','ak_4363854d227bd0fb','2023-07-03 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$SIn.Ulq0l3js1ezZ1oi2BtlyQYCldOmZqpBCTC1qa0o4T05Wk5Pvc','user','ak_ec99653e3fd820c4','2023-12-09 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$jSH2QrrdvH/K27JiN8R9RjKeuDc5lmiUmKIg3GNv.M37YPCraPtun','user','ak_d4b7d1a8dc90bd70','2023-08-21 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$MGxS2Yca.alCMg6QGHtaZ2Bv63tU5zzotabIo63jgeM1EBsfOgpr1','user','ak_ad431fd98242d71f','2023-10-28 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$cdsShHq8Iu4pAJNEmhfVAArZW/Mm6bJrRSvL8qzlQZFuF0vS8Lj/i','user','ak_d637de50e8978dc4','2023-03-27 10:14:00',NULL);

