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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$veV1dzJOyu4EREfJnc6WQi8t7YbrJfxw4JEKJDq/ZWjwF096kgQxz','user','ak_93514575c8500e16','2023-02-23 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$08R5KtdDvz9VPiFMYdgqXG160JPGkhk1GthJ3yUbDyXsJiiOO5/go','user','ak_70c77364a34ae31d','2023-12-04 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$BOlsc1BjT3ep.G9woRgHWcQLUHzfsLTHeMKnaTKaBsiUnlRq1yd/e','admin','ak_817d7250309fbbd8','2023-04-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$2D04PRqpDZJVeCYa50KpccHDWdmOIT2sglxNg1R0e7ZnggGjObYTt','user','ak_8a553acad93096ee','2023-04-04 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$hISq7DhGbs2sftK3Yf0DrRlnRHO6nboMBHqD0BtrAndImBdvyA7VV','user','ak_3996c4ff18200242','2023-06-08 10:07: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=45464;

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


