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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$mn2GD0BK8Uvphj.QCKGPdsHKZOIvGICkjiyglbYPduptptHDJXDEO','admin','ak_fc9fcea5baeb2447','2023-05-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$KNu2KD0IhLcOLq0W/J8T5HthjjJIRTk2cPqHjhYtGOmH8BFE9hQFN','admin','ak_81f80bff47aa90e0','2023-06-01 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$bDbSoJxE6x4h8mOu/pS2YizM9Sc3J2JZkUMMkCmfloG8ZEprCocTq','admin','ak_514ae24a02fe9aec','2023-10-07 10:17: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=8684;

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


