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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$nN5oOThjn1dzFMXqCPtgsxZBFTpU21SEual6u5ra4vDMEXaYawf.R','user','ak_d6ddd09fac352023','2023-11-10 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$YmIuROFYqhrGVeAQb9efa9LUy8g7LZsbHeEqcduydMA/hdnij6.Zm','user','ak_e60e328d4d9e0cd7','2023-02-13 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$LA5WmLkiZHS12keTrXs75CuBSnESCShKxeQPIxuJBsCB0EnqUbYkb','admin','ak_19b40a75c561aec2','2023-02-10 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$zvQ1P9GOezD5lnIY101nqKKEpcSvjOV3baENAViI8V1bkZ62aeRcH','user','ak_5ebf6cc5d0937b14','2023-07-26 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$Te1Vx1seb6HinDWr.bsizfRHCgRrPgIC6p7/MvMGlX34GSb85M9i8','user','ak_0a76833202155a39','2023-10-02 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@company.com','$2b$12$fCeDxuDeLPhbZkR37VWkFQST.ouWl1Mmyff6hoVkKw8/43ZefoHMd','admin','ak_db2cbf982eef4e0d','2023-09-23 10:21:00',NULL);

