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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$cA5Dk/g5Ler1K.d009Z3.yosA7Ggaksm9H.ROzmqTXqVYvKSqD9AO','admin','ak_e8196858f2d73e9b','2023-11-15 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Qnaz3fkszumZRmJ//ZnLqEotxZQf./i646wY8ZOggil0lOC6EnS1d','user','ak_2008e61a0264945f','2023-07-24 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$YfP1q54pZx2jSvIo1.vI2gT2HyYhKqNBBtka4adr3Y.PHVZeLd6Qm','admin','ak_caff5eb08d37142f','2023-05-27 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$uGzHotCcpR5.LCRWD1aY7FQcmOuTumEYgrV99E4cVBw/E4XXz5XdD','user','ak_fd0b02efee772110','2023-07-27 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$sUQ4iaNbRyvQpfX/Bo3P6VmkkIJFHmjKpVgD1DqThJYHOPQSk/6Mo','user','ak_5fee82a03e5c1678','2023-07-06 10:06: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=49216;

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


