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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$oyVrpc4EoikuISz5Fxz/SU4flBFpk/U0/PYuVtHbIxRSlwO1VOeDL','user','ak_7a88d39c3b83a595','2023-09-18 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$46o7ck3ztStL8m0dT0v0fuRPWZb6Fa0MqZ2MJoiHK6IUpgShW9KB/','admin','ak_ca7eb815f72711af','2023-06-12 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Xr95.NrwFX9CbUSPxDEusIjxuqq3nUrPun5X/Nq4xo9.XgVSBz.wp','admin','ak_7390a92bd28cdb80','2023-05-08 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$1yUdpBAwSjFG6XBJpowSF461c/6WGQfAiW4f0oceqE/r42289uWYy','admin','ak_7eba2ce85c438a74','2023-07-15 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$Oydn7ierKPBxT0LqZ/hY3uzeu1V0WZYNgrDR0c5Cl/ylS/hPGX7Oy','user','ak_60f7ae92ace4f96c','2023-11-16 10:21: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=5289;

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


