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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$DneMi7SKrW9Enc6Pr8Tpvr/SnxjQ4p3doJmD1jCapWAnxzn8tB5b4','user','ak_f93d8fe40879394c','2023-06-07 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$LH7EH/yTNXdYwCS5lSrF1/KZJ/a0PxgE/0DTyGMBC41Q1NPElda6i','user','ak_67b42c837d2e551c','2023-12-26 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$KFaCFhOKkd//FcdHwH29dvbfNl.U6cGlq4vQGEn2AVtltC/m0DtO2','user','ak_416c0d531983d069','2023-05-06 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$0d07rtGwbtbvFDAj7EuOa1FdOQ7GNhLr6xTHhXir8nNHYancaOsD3','user','ak_53727984fc172781','2023-08-01 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$Kd2WkcZ6zdGOpOISQvoWlMAPhMJeCIzMdjuvjRveFuVsHNmgfZsux','user','ak_b6c637e9c932f6d7','2023-05-15 10:23:00',NULL);

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

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


