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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$PqUotbf6B47qfpYRHpwbPOlCWDHq.E9/S6vDISPxXX93WTchhXdkP','user','ak_6f2b455d6aa42b04','2023-07-27 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$cGVC2Q/IpQCkXQYSsmQpGGmPch5qykiIczvEn8RGiEZPOVz3Sji0J','admin','ak_330403f8696dbc51','2023-08-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Gdck9N06UuqkrGTiAyKTQrUICkyCKzILDgFP3DxdJJH8hPuTVcL3L','user','ak_2ef3e7f95653224e','2023-03-13 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ucYTFPPU72EuBh.Fi6K1zba3brGosaf754Q9Vxoyt5roJYayMQD8d','admin','ak_b6d9b9bfea569dd6','2023-03-10 10:15:00',NULL);

