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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$nW9/yc3FuqWKVqLL2BfAttIxZ60r5FEcmacJdIoQqG5jUAYOgTfmU','admin','ak_8a1300ead728711f','2023-05-22 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$7AKM4k/CVkeBgnereJtWRwJIrXvrHilHLE/jrh9TER3DwQcsnzhh9','user','ak_6d122f4e5f593e5f','2023-08-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$poUqRqicAHToVdRoj7h6eqGX7MUeJXss8z1BSdH.PF2WBEAQ49hbC','user','ak_0eb10f40765f9239','2023-05-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$vYQO5lSBXECazyTO1S5ztRDh0IFO9UnKLR1pB6IRUh1SFqzF8p1ws','user','ak_ff510bc5eb6eb021','2023-05-07 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$z90xXrSME7mAwSyMFczIpNtsBbmRPJitF8a70qjFLaLYzNg7QIhOo','user','ak_f9bc1ecbc31f4922','2023-03-07 10:16:00',NULL);

