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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$p4/8fp5IH2h8KzR6jvgqZ9DSBmT6.v4Wr3kERHEDYsDMHfRBFpuMf','user','ak_4d5ff41741c361cb','2023-08-15 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$FinWTipHiDbjZsz4MPEVGH2t5MR9sEFkWLbWqg/xMjY0wGwYvMaZZ','user','ak_7e54777dee57ca1d','2023-06-07 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$gSWIk94GpJbw.MnMHdEejBpezfp2OvPjbADdnkc81xhzcgxOkHug8','user','ak_599bb97e77f837de','2023-03-03 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$ZbxpHF8QqGiZ1oiLrp6GlMqhe22TqaZPvanr.iAiLD9mhD/vDCtZ.','user','ak_c393a0bf475c60b3','2023-08-17 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$2rD7wtolKFUmkCXdutwTX3LTIa4WBIOjahJkmrYbd7BH1V7tqkXp2','admin','ak_716a980526faf4a8','2023-07-13 10:18: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=18198;

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


