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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$Z8ZtRfRCGcdA58O88evWedMaz61OYUHg.c7U9FdunCPvC9X0FpiX8','user','ak_433ac532658940bc','2023-02-18 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$MWrxKUERSHZUtnihhyXxUU9tYgUMFBHjfrFs8t82zUV66uLVqSN0z','admin','ak_dd5a9a5093e28d7e','2023-01-09 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Saz6In6KiOLmRoUHahPwotarXZymUu7L0KLEWu4OvYlINk.Cb.mQR','admin','ak_8b5e3475401e5b53','2023-04-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$3LgdeQt8P9aK4l1M0cTrGc7TWOkYv2kOrb4AiVrpWxarjfSFPJFky','user','ak_7b247c3f6450bb0f','2023-03-08 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$mzfCRxlAT6WvaFdUEktxrJmxdm6cgzoLjwrsPsbL4EZZolnT2bMkL','admin','ak_93f24922cd2e7199','2023-01-28 10:10:00',NULL);

