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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$unc.7.cSseVjsWJ4ntS..1co.Ra5W9pyaf6iVKsHy3tMe0IcL/5EP','admin','ak_411aae28cbbd4aab','2023-05-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$DtDBvJB0iH/x00yfUbKNqCk0UixBUOiGYZ6cZNm2L//0q8DKt7ZnC','user','ak_ab416841114ab0ed','2023-03-15 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$JmoT869LOC8D7NXMmyklE/eJkXq/C1U2rpZf59KvAIQNfaGqmDLhB','user','ak_f8aebb240e65eaf8','2023-05-21 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$A/qSi2JEx6rfzh2DdLh8eD14h9caJhQ5k54iArJTUS3gC9deflo3A','admin','ak_1318543e60411781','2023-08-27 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$Dx4YJpumh1lbDe9eNVszv3gB1Ct.4wCyfTvTvjx9xrSPXIRd0tC27','user','ak_8cbe4904e7c67788','2023-09-26 10:15:00',NULL);

