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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$pytWqPyplStr9S/cdmxgJBADYrXPzwti9kvDXwqdj2Pxhw7SiLlPY','admin','ak_c457c209305cf37b','2023-09-25 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$u3ekpvJOkpYdxVUz0dXfr5/HSLwDTbYxtfFU3mGZ7l89.gGL0mh0F','admin','ak_5fec2d8a82155070','2023-07-20 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$No1XWcSt6piONZjIVftK3Ur6GCrENqUdawj1JpD4UfJBeir21sscM','user','ak_32834c48294a6158','2023-01-07 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$iZtes6QFeVU7z0S49aZbaDNPpM8HGkS8.lPAhjmMc7abB4cHjDYV3','user','ak_201557e17c2db8b8','2023-04-16 10:18:00',NULL);

