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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=46968;

--
-- Dumping data for table `sessions`
--


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$OA3vgVEsHLELvgHXQoBSMZRk6l3N6R3IxRxwuCG6kYjDDT5h36m1T','user','ak_d233c379c525a9e2','2023-02-21 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$XLRI94RcO1nI79ybDOrOKo2wmPv5/gumYKem8rNuQRaIdrYSRCE/W','admin','ak_4c40fdf480303536','2023-08-14 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$0zn9Ex3T/ScPIZmq6Mnod2kH5jnRw3/hhZW2BQH2GszxS.QCDpzpe','user','ak_6e44b42640c61176','2023-04-22 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$0inTODbXSBioTAgbeSzYaUnUUswNSnpTYVuONS3gtL0URSt9S33HE','user','ak_8fd1cc6de40d4688','2023-07-09 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$prrHViJtFu56fkAAK/g5Nl61R9AG5fB812AUPyOwHNqeOTjlU9DQM','user','ak_7e123d48e966a401','2023-07-04 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$ROgMUin7YiMhwkGWTCVWsFK2y901VuG9TVsFevpZB6ViaL4oPKypS','user','ak_681f4efa7cc96b73','2023-02-16 10:20:00',NULL);

