-- Host: db-master-9.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$7c3P6bSi87YjBpQhAfKfNzB5bXxYN0bt3/IeZ2gs5MYJqqIgLBOMp','admin','ak_66465048df217f34','2023-12-27 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$FmKKU2.b.dba8zTagUtpHlnzLqssfaJEuLgdpQ5hw.qR1xtHtp.aC','user','ak_c70f67f7aa7930d0','2023-05-03 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$hf/xvNMYLMvU3AzXinEwm5.A7RvSwtPcMGBVbqAYHGjSeF88ClSVe','user','ak_6c6903f807a77431','2023-06-06 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$lxIoCskGa/pRdR1S.JWKeKdjr/WMVSB.0CAsMU8bS5dRqejjhzJWU','user','ak_c774d059132376da','2023-01-15 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$.O55HJoobgQvDT9Q0Ahwws5F5KIaUGcNEImccXDVDaSTsshk60pTu','admin','ak_3ec9a34f337ae757','2023-06-09 10:11:00',NULL);

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

--
-- Dumping data for table `orders`
--


