-- Host: db-master-3.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=35944;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$nAUIJsZACicncGRmMrYHKIadP2Netz8aj2afPUwADER/d.NSxDURd','user','ak_9b8b8ee892cace53','2023-05-05 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$QF.wg8KN9HfxicpZKhXgkgArt5ZM1AidW3ZJXaSqeALuDbn.zGnx8','user','ak_fc38396467874914','2023-12-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$koldIPLGKIlbTPe.d.LgVjg9M3r998wDYPc2qXgnP5nqI0pTBVBV7','user','ak_cbcbcc63d4923362','2023-10-07 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$sYYT/o0AdRumeHazVYgTtv1gfpmoGDjymF3tRMVMoBmMrDZo/WVTn','admin','ak_b215a9fa4dc1581b','2023-02-18 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$5p5o7t9tP.I4B2DFR3ZA.bDkH6v/YfcRjizZPEQFH6TkkHBJAcJPy','admin','ak_f9f4e170984ff107','2023-11-12 10:17:00',NULL);

