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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$z5WykD4AAWXayCIpbIol4Jmc7W.5hIoo9kEgikWSSEv2oX.lR6BIT','user','ak_185c8d229f4b7d8b','2023-02-07 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$/aZQnUR7E8XQT8ylpsNChM1fwvuIpoigJnJ6nd22HwzsbtAI6IeQ5','user','ak_79dea5cd68b0fd3c','2023-07-03 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$Hu/iRriOeDgewy1hz/1f31/zpJRWPKoIftO0AhZAOGHOkCCLjsYyX','admin','ak_3b9a6d7a2cac6b2f','2023-11-27 10:05:00',NULL);

