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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$DKiaWaKk2dkn7cqOWjxg3.IlER/7uqfp49Y17ys5EIwa5KZAcTMW6','admin','ak_ae5fbd397f2e2826','2023-01-01 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$Qc4l./HV6wVBFh4FkvyZFzgg9ALsEC.XBkOiNDU0RjDDuNeglGyAd','admin','ak_9424e484be458965','2023-11-12 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$zEWMq9MVz6VtqPFwEt1Aw7r5ubm9XN.gWfnEPh.suBvNDV/iZwX0x','user','ak_6a348279a2c1c986','2023-10-27 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$f4jylbeRTtm8oX0rWixh/Q4iX0hNeqYu3I04B0NTkqflADnxgsnTi','user','ak_c18825487c7bab9a','2023-09-17 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$IyVJFs4KpTXLwPAli.I5EASbdQT3JDsQeex/Ln.StAxejTZYDvWOF','user','ak_6a362d36026069ad','2023-04-13 10:15:00',NULL);

