-- Host: db-master-6.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=26565;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$sB/0KJaHgLqaqYpMgc2giojggMULmIbDOat.DZf1mPxTLqvRhJJ60','admin','ak_0f7eea142ec8d7d0','2023-08-15 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$3qu8Qm4oGKIw8cpDu2e1TN/XvyhcFMIzThlmM/9vZLLu1ATYjUGF4','admin','ak_95f1f4e0588a6374','2023-10-12 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$qiGea8F0XIfcH1BAM5DQTBfaHvdQz.XZrRau9TjvsUZ0L8BWnwVSA','user','ak_3f58fbb28dc3b277','2023-01-26 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$z.pv2bSv1Q2exZnRiomd8J1X0w9h4WQZ.1Jxj58NMZeYClWQwYMln','admin','ak_5bba1bb51913705c','2023-03-25 10:19:00',NULL);

