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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$uhu46z1iFzlvPNyIs8N0UIrrQo1n6P0X0NXv2VVkB.8NKNVF1dmSa','user','ak_96e8e245dea04bbb','2023-12-17 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$jJx/aGQqxI48w9nmAgncJrwDVl43FXfywOVyDRqsVCHSIbyh64dhN','admin','ak_93edb30e2f5f92da','2023-12-24 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$gp8ea.ykcBsziqKOMJtkTn7.JgVvYAz/AqoTj0Zi6LdioHUHHLZp2','admin','ak_94717ecbef821100','2023-12-21 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$Ew3Prac3cdwQmq0K28VtNO5K9D/b6O0H1VnH/Q874dQavN7qAPm.q','user','ak_d58e911834630e04','2023-07-01 10:12:00',NULL);

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

--
-- Dumping data for table `orders`
--


