-- Host: db-master-5.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=23341;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$gexvaZW4RCZoOTsHMYauB6H9yDo2Ia.QN/8o.Ju9d.2/k23nZ6q.M','user','ak_d45537825e0c8644','2023-07-10 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$1WyGSvdHwm8isasYeTakivDTfAoJ9by8MZ68vMbJpBKluWcOiQJNd','user','ak_0ecad9f9ea11067c','2023-03-21 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$gQySNnhjaDk1yKZmUcEpgOO2Dgl8gKrrHII.dy50Ww.QoSV8gdcA0','admin','ak_d5c8b4cbe37edcec','2023-05-13 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$CrdRwigLydyb9syf3XYMBwFBJokYsenGh4hwvK2KbiFACVG9iePPa','user','ak_b4042d73434350a2','2023-02-21 10:22:00',NULL);

