-- Host: db-master-8.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=14359;

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$OfWMI.Xc0N4uXg/EvR3AagEf6pwdQm9wokLzxZYHks5flj7ENYSqw','user','ak_6e2de3bd9357be40','2023-11-11 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$VIzebX1vvSQe7a6veGfeshOQmUxR3o2Qq06N/TEuYCMuuoHqZii/N','user','ak_99a1beecce6f15c6','2023-12-25 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$YRzswlnts2/bvHP7m05Iy1RhaY0lHn3k0y2vOm/cqZJqEewqWB5w/','admin','ak_e20d7914507cfc87','2023-03-19 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$iINuANwNpOl/5g5J8Ab6vdy9MqO1FkIP3TrhuBznG66qEgC7SPCMp','user','ak_c246e44cd10f3396','2023-10-13 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$0eDig.KH7RzbTQF7SySiDFTylHxgD0sks8.3nmUzLIHcewcVwC5ZM','admin','ak_0a62ac5b955310a8','2023-12-26 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=30525;

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


