-- Host: db-master-8.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=1887;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$JpwLaRkNN7bW9UE4FbdXesUGNn0K96oMgONfd/bwhd0qZIBfIrq2Z','user','ak_578ac76bd3f0e3d4','2023-04-18 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$JOfBVdnnKP1xbZOev6AvkqXIOe3XgAtIpR4dbbS6HNEXU2oykUh7J','user','ak_08a3cb0bd13d42fd','2023-09-28 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$ryjXFBG1XPyaiopfAAPjkLwvcw.RDdxyXloBY550k/RY1ZxLKXpf0','admin','ak_246fce6bafa2ceb3','2023-04-20 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$ePZ9b0PfBGZ5R17UeVLZFyxaAzfS10/00NN1dJ5dTywKkhndvywnO','admin','ak_1f32250a9b648cc0','2023-03-28 10:08:00',NULL);

