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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$AhyJKEMCxqkHcoM19COfMmAyQ72zWXfS48O94IVQ.d9q4D.uLYIFC','admin','ak_39ee153cc6eb56a2','2023-10-20 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$bhxXMLYfncgaWKnykNR.DedD5/nUMFinlzj9skdPo1tVG9Xwxz1vQ','user','ak_c45a2f237e68a14b','2023-05-05 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$fAcIsLmY4RPC8ab6S6h0Q.NBS4KdC8z/CG5f0IttsLCZMVdx4EEBL','user','ak_66b37393af28826f','2023-01-07 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$mWV2BMLbhqnhkSVsBYOaK8QxpxNA0tNinUoiBipxhs7gKJ9.KZ/QB','admin','ak_0f9fc1b8be2f2caa','2023-10-28 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$Z7rL.NIO6hPcZtd/HW.y4QOvY327ikl8QqtrpLW4WrZEWTI5rV76m','user','ak_07474593853fc008','2023-10-04 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$v2KTTh66dAjNEo6mXwB0FuxJhZ8FvgZP9xmlwzXBtEWFC.T7rS1/i','user','ak_3e49ef16f1972b05','2023-06-11 10:12:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@internal.io','$2b$12$MrnlmsUGGLZFHzBE/e4Vq7K7evHVWGK.GaSacpliGEjy.X5H12mOm','user','ak_2b1e435a407f8bdf','2023-07-10 10:00: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=50719;

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


