-- Host: db-master-9.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=16365;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$ySlOKSpGWfRGtp4OM8yBYRRdPHt/gOGVZf7YcEVsdXuoYMIMZbxZc','admin','ak_e2d3d60fc4dd41cf','2023-10-19 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$1He/LWHnZ3Z/3I.Z3NpZYEIopcKPOjy7rF6vOQXJJtX0ff94bMgPm','admin','ak_83e0082f203fd69c','2023-02-13 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$LtGUqQz4MrNssghT7Gw1zxOqr4H4XlcWa8O75ZUDC1DTvApGZ5SsW','user','ak_102229d391cd94ef','2023-05-08 10:13:00',NULL);

