-- Host: db-master-6.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=45249;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=49249;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$WsBchDzFS19msskTdrr/JpRSi9SdOxJj/1kMQsU/WIMIMBV.ZjyIH','admin','ak_9c1ebf10fc437c6c','2023-09-19 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$mn8IvypzQr88szKykOPz5SK5kRtLbY02NYliHkdFiXNxfQkeU35Ct','user','ak_12405fb7a0965df9','2023-05-23 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$kqw8/CvtlpsFUq.QcwzdRU5Z8Eb0m0fuCqBCafFodkl/GPtppDeKb','admin','ak_f3ffdbb0db60e51f','2023-08-27 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$JV4xcmXPJBJarnOdKXuJSTMBJ.babig54UDxFLm31qQ/Y0tpfODwX','user','ak_6128a2bd85ca0854','2023-05-09 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$IUsdDHA2k7SBNjO9gUlvJ3RQsH0fN2ox.6sZ7Igq2XWdkxR1KR50/','admin','ak_07ef8b5bf0dae598','2023-06-07 10:11:00',NULL);

