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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$koBwjaB18w1fkSMravLqbUzdltqPZqhppqIAQQqzIHOn5wQGgUpfy','user','ak_39d47a29adcfe921','2023-05-12 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$EJ/Nv/6pcb3JQegAJB93T7o1C47Cary9Sdqp219gEvzZNqnRy0kCa','user','ak_e62d60663d9e16e0','2023-10-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$MkRDh5taSWQlqyaFhczTgIgo1q6wDgazI8MQQ.cLeOchMQAkG7K6j','user','ak_fcbfecf2045696e2','2023-07-20 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$4vaPuBhgkR4nDVlmYn/ll72peTdl/JrqCkvuR66XT7CMZ0OzyHtxY','admin','ak_acc41b84492a55eb','2023-10-13 10:20:00',NULL);

