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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$8URg9wb4Pb.0ZhXzatW1BVeVv8bNXlBWX6yASDmq6rm2eHpqUS..8','admin','ak_d4ef8cb6ed5ecf0d','2023-09-12 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$uGhu4oRrOE0lKSVmNow.p1yrubcuJiJjPkwact1AQoQMpbtQBNLme','user','ak_fe1a6513d5c5052e','2023-12-09 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$8C5fvD8avUyvyIrtbCXHu.KocBjJgw7x7Q0gZpBYs0rSto9LkV2KG','user','ak_6596b271bde095ac','2023-10-14 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$eD9JEzt1trJdWxffdkW8A.CjpEy2Q4z6JEfn3yXF0Xmcr7XXOu74D','user','ak_19769b29f12485eb','2023-05-19 10:20:00',NULL);

