-- Host: db-master-0.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$iVv68IbIvqjG6aQ6Or45ESvg5UYUpmN8LPJ6zNAj.ujqnqfATkHbD','user','ak_d586e8dbf7436a37','2023-07-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$NqabNQCabBwDetjsharruAagehr6C9IY./XafXzmJf0FOpwmbgQwN','user','ak_22d2c86946b23040','2023-02-21 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$/AaPq3M1Q/Yn9TkKM4aV1zMWj5da25u.D4To.9FsgkRnpy8HTk2Cm','user','ak_f9f71bbba3448317','2023-02-16 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$2AvqxM54N8TQN/.ymPEyZo2tp6vcwagABMwSsyZYPeWU/8GzWkekx','admin','ak_4b317c1d5fa7369a','2023-07-22 10:20:00',NULL);

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

--
-- Dumping data for table `orders`
--


