-- Host: db-master-5.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$KnyKmbcGoRUTwFASX/FoK30yUSYCkUuHfzRC/IEJczXqGeAbd.EJO','user','ak_4c109b70ab122c64','2023-08-19 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$cMZDik8R5HLN0BrwF0HcyE80kspPMcY281ZF7Hbe/5fh37e0h1rAT','user','ak_8e3fea4e39abf491','2023-12-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$iJdxMy5YxRwOMOBk94G0zlkygPwnOM7vSvo9ACD7AZ2imXBhVoAft','user','ak_98fa0cf03679fb85','2023-10-09 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$2DLQhCpxBCvtKRMeB7PuasIhBiDbHIYCIoikaMRRCLEDXL8b1w0Xx','user','ak_a4600c78b2bff972','2023-12-14 10:10:00',NULL);

