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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$/PIT8PAv8d9vhVSrC6bwkzItrKj2lTzaKrsqbFtoXdlNdODtuXssr','user','ak_85ecaaae50f995d6','2023-03-22 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$YUM/mjd6Yw4SCGh6G3IzuqePwcFcwB3lZ0PBjgFyiR8uhXI1O8Aes','user','ak_aa296102e4a1dd19','2023-07-17 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$msHieEdBZ6JbWJnV9oygsBc2GixjlfAPkOwFrZARyHEEdY8GcrNOd','user','ak_1df8147504647313','2023-12-18 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$S6Yaa/uTq2UNOlThjo1KPBcH3o1GODMy5EMi9WArB9flqaVExM8tZ','admin','ak_631c36ca2a48962a','2023-05-10 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$JBiAEuh09UeGh3zsx/LFHRtFyiCl6n4QZjcDJSeiTYP8UDFwzZc6M','admin','ak_8984c82e58d1234a','2023-02-04 10:22: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=2037;

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


