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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$.dMUX/VvdSRbkinJstesaGt90JiKue6r3KtRjolSphOL2HV8EyMSS','user','ak_1dac88c04656ca50','2023-04-22 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$YeHsZhNyvjfEmj3evICqdsMMhwcaJoURdrnE6JgivFBdQKNao8DA9','user','ak_4f53f102ca0720c4','2023-09-25 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$TRAT2h.YFZM39RdwXCYVJAeGGkB6ySx67uP.z1I3xK8.pO0v.RtSp','user','ak_6d9ae6b90fb00a11','2023-05-25 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$G22eDJtHNYIoYmLqaQSrs3xWJGlZ/4UvpBUo1uM5Qy3bQRo9X5NXv','admin','ak_4b66ec2e1879da2b','2023-12-19 10:11:00',NULL);

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

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


