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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$/yoOiwNA1AWTn/iyZjSFe24mfrdM8NNBIT0wQdp3hUW5DSKw0FkHR','user','ak_d9c6634375fae4b5','2023-12-08 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$uv1LYvn2T1TX916pBZRqDq/CmTKkCScWuTIXvCsaC/BShbOmU8ifk','user','ak_44d0c38bd385f0b8','2023-06-11 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$6XYYEqU4HjQiCMkqE6yKGsQHpO/r9pZQ6fpuqKGO42JlJcd4dgYm3','user','ak_562526d715f18899','2023-04-13 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$6cT67SjvnuPa7CUhkPUqTlF5jgXEQyNkTqIdrluwm3z2WxziUHxD7','user','ak_4d27c86e3bb2f2db','2023-08-24 10:14:00',NULL);

