-- Host: db-master-4.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=17376;

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$uwNcpQOstPVl1KOQNmBIfxCikSejpgClyR4jfvTR6o0fwXZGRSnZm','user','ak_493b371ee7b4f865','2023-02-20 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$2e6mnJgIUJpK7OcrLIHtu06uhzpAV0qP2Z7fJhz3a4y2VHB6qmZB6','user','ak_4a16f1508e16e24e','2023-05-01 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$TOI9UMR.D7zUK5NDaqe8KS/RmcmYs2xMhRiTcJ2EtVBkksQkrcwLn','user','ak_6bc68e832a725c22','2023-01-10 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$wHUUOpmsm1kTDid8oO4SF8omIWwe3RT03hKP6OKzRjN/KbIymREk/','user','ak_d8d1c03bd0413ade','2023-02-17 10:09: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=28201;

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


