-- Host: db-master-8.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=41237;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$bTOBx/jmpp81YqCrl9XonTIldBaMAH.q.BIfcYfHh8JPuprEf3dEz','user','ak_7685f079972365d8','2023-08-04 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$3r8x3bG6tFeWfkDnKJgn7OuqXNbuhLZk4Y10ubIbLpzjTI6gYMsnX','user','ak_5d1b45b46f7d2d23','2023-05-19 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$tv3oLl2H9QfacafemskRLsNbng4vjA7tTmSTbKOTCHqnxl2zGcpRI','admin','ak_050de922c4dfe4e7','2023-01-16 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$y8i4c56O.i3MZRujxJLM/HQR.uG9adhNUr6h/V5voL2nuDx7fa0ho','admin','ak_4de7f6c33b77f6a2','2023-08-22 10:05: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=30680;

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


