-- Host: db-master-0.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$l3viVl.Hy7qx6Wh09Vp73Lpz5SYeQ3Rf6Dfd5FRtHiFsb3OHeduVv','user','ak_4c39b68ec0d11dbd','2023-07-03 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$/m2fg0gNmKemKTqDXJGb9.GVkDJKFr3lRt3PfQcJR2ZPIrO/EMdFJ','user','ak_f92d2fc11617574a','2023-11-24 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Jrqfo2IL4YKU7OQwfhHt0OOmewCt5vZwCQ3z4oBnaSKCQF8mp.l5l','user','ak_976c7bea48802e0d','2023-05-25 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$VvFb/D.0IpwDky81KEV5J5YBhRt3F6oy5rNtKcI.HifPGHRC2fLfn','user','ak_1a7e8c70f68cacaf','2023-03-17 10:14:00',NULL);

