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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$ojqfR6vSNgAz6WTMOhXNM.teYQgPUM7oCgrRH/J6IVsY87D5N4FFz','user','ak_5ce43e2d9be50d9e','2023-09-17 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$KGR8XznuPuO1MP0JFrTvqZGKFw6IJb9fqotQ863V16yFPbL8R2Ja2','user','ak_2683393874ae3f55','2023-03-17 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$faFKd.M6SjPBAOMliUNmTM/Kw.OO38.bFwpojXNAa8QEUM8I6PVh6','user','ak_828bf1540e47b8ba','2023-03-07 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$CjfpeQ4S4euyysV4g5Kqk0ZQACZeIyjUjddEiw9VWZI7kvImtuAfP','user','ak_d628d2a2babc3277','2023-09-17 10:12:00',NULL);

