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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$V/Q2MpRVPgprCaYG.hsfP8.McoCasZE4IKX9VMqR1OZI.6acYAryF','admin','ak_15ce54340beb8016','2023-11-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$Ut8JwoJUATU05Uk4wIPMxJ9VldynTJtPR11tsjI0hVzCGgLQFjLHn','user','ak_05acaca933d9cbe5','2023-08-01 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$R37zd3CjAA18gSmUYj0kFDjBaG.hBKEa/W6mAbpaGkZPJvTMfFhiz','user','ak_e957c7b83ccfdda7','2023-09-07 10:20:00',NULL);

