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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$zNYZ8Ata7GKpbtzceKT.B0TtbtIzvrjP.tRzanceSW52ktfNku5j4','admin','ak_0259b3f96490752a','2023-11-21 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Cr.2ynVMKtN4.QEOgk4/8mLPG4I67Hyfwet3dLViFj9kqN48U9atU','user','ak_c07150bfcbfb5808','2023-04-01 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$/Sx7GBFJvInEBqpQzmGcGLDuHdUvUbjNDwNONcmdYyh8IXk4CXyB0','user','ak_92b0c5908c9124d5','2023-02-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$pPD.aAqO4gWNyG3fHfIIyfYSKDQyEcRnnHciIXMx1oIRkGaQ2uAd/','admin','ak_cb552fc0d3721952','2023-03-07 10:19:00',NULL);

