-- Host: db-master-0.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=32557;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$4f6WoBX3iqXnwHsP1rDFGWoSDiQqFnHBARQpfIxwxFEByXNgD.AZ6','admin','ak_b7e1479241de5e58','2023-08-06 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$IjdhF0EwCA.QQFOPSNDD736E6LC.H.sqAVqNGSv.OEyACVpR9cQyN','user','ak_0216c3f211491b5b','2023-10-19 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$dhCjRgY.a46N89Y0lWPqQCp4uZXnj01qQyEcORMaiRyIY9sGqku0/','admin','ak_c23410a98ec306ed','2023-09-19 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$oaZDr7U30vgBRuqBg.txPb3u4n6NnZDZtbZh37BXgUyhmUkatEf16','admin','ak_b596941a258ed782','2023-09-14 10:11:00',NULL);

