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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$PgIoQvwuUfslnUFOHEI36kt8SQaCHBMIItI7g1PGmTXa0796u/.0Z','admin','ak_5e510439c27537cf','2023-05-07 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$LScJg9fxvLhWnnIABU5B3VD2cNTTYG6tdzXe8TPdRvSJCMg3smSxR','user','ak_d69e17b571ed9675','2023-12-18 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$VWbJ4vRrut9v27rQ0Rhq9Z/.j/x5q8IqJ9egR3cl0qnqYZVSQjGjN','admin','ak_7291680e13fdf70a','2023-01-19 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$RGf7WwAwt7MOQxmICgjEJfmjcBQTyvoXnCcMWbap/N7NpNldlRiNJ','admin','ak_b4d98633c76d44ea','2023-01-26 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$NiRECD1YneuV7v9EacgAtAgyPAOPI58YjPM.O9UfPIb5CAh8JQi87','user','ak_d4f97d2c524f4490','2023-06-18 10:20:00',NULL);

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

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


