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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$V.jjECjG/UikIwRM6B8qdrj9NWcChJBAyPq8YbHX66g0qlDDcEnBU','user','ak_a9e33c5bf343b3ba','2023-08-17 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$I2GZLWhztGiN5HhvRFT5dmSwYI8hkW417aYdWnjTIXVRxdViRJWlO','admin','ak_fae9c513b220b918','2023-08-01 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$F5xmVmFlZVQXzY5HrbmirfbgiXid5CIvfEJ89cxjwX26POOT9tOZH','user','ak_84a2457def7b9ac8','2023-04-14 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$JfZUT9FPgeV5N.CkDV/KceANHm5gtKdchGJe7W7D.s4dOCGEtY8JM','user','ak_5ca233d96c6740fc','2023-03-22 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$6XqwVSiMiMkYtW82vD6L6x.Es2RWTyRHPrmVRD/A3soWti3z14zf9','user','ak_b0a33047e1170125','2023-11-14 10:00: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=7968;

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


