-- Host: db-master-5.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=15504;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$NHs0A4NDTkWxHcBZ5PI0MD7FxS4pDLkodkXJd68ehPWssRZX3hBQC','user','ak_55c4daf81619a8f4','2023-12-14 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$wO2048cDhproEn0E8wnWN1VMoe.mSNboOpzflj5rVCoZEUMz8qFZp','user','ak_6a9c9f1591812412','2023-08-12 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$7AeOS6pjEf1kv9tUXqlcPuLqAA5LFxnqeieJGeGG1cJWDe9tb5DmX','user','ak_c09aaeb233ba77d6','2023-07-24 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$kCRS/ptggYRHCunQfATTDxGL1Zum0nakOqH1542gWoyyJClXptVio','user','ak_491b95d837c5b494','2023-08-11 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$eWy77WQ5hRz4vdubWZHqK43BUrmRFkoQBCIopJPjvuirXYjnJ7AkU','user','ak_20a82113f43bbd3a','2023-06-05 10:04:00',NULL);

