-- Host: db-master-3.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=42454;

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$/OxFRf5u0wTuWjLfQTG8lA4FOXMCm4A9dprcWrfTRe4g7boWngyIv','user','ak_08f6806cbd586414','2023-04-04 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$HlaHG1oJbRRhghKG/CfrhxJQ54aunkwWHwi6EJhlINq/xC0GvdKvJ','user','ak_dd1182cdaabf7934','2023-01-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$TmyKXzylbDT4x5YD8vUjo64sUwxXhvCypBB9G9uZrccEhPKxiRV3U','admin','ak_8e7d1cc45e7358a3','2023-07-18 10:11: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=13722;

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


