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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$ZuK0ZJWPwlvTozmBeS1yXlCpYALWUDQEM3PEdJtHV6HHH5grkPuSS','admin','ak_ca50a6da37dd1a94','2023-04-10 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$/5uuFOO6mtYhsv8p5A66GdEOwLWWYwy3YtsZSLx/28qRt75D8Xijz','user','ak_80f11017068db156','2023-04-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$Lm4TasjERxHyHnEPWipcwLEyq24kj5L2rteI5z5xMICN7WNwIXF./','admin','ak_5ca09a674d2c90bc','2023-02-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$btVDWdh5jt4P9hpG9fz124C9B7BrDt5.ppSqiDSGto15jgeaMu.TX','user','ak_6d0e3255c90abeeb','2023-02-12 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$19OcD1JnkdLC8NU5/Ob.pNzffItHLwOCutAreWBfnwungUVy8XHgT','admin','ak_734d1c6d5ebe5a38','2023-02-15 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$gBq/AUBak4fXA6uzW0Cdlohe4Ml8oE9AggNcVtEKWR88T0sb/u1l7','admin','ak_9dda9a63fed21fe7','2023-07-08 10:04:00',NULL);

