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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$l2zzyenQD/67ur1a73g8y31nc9QES8i5H/A9yofeYGfwHswOUF4gb','user','ak_3d8553f12932656a','2023-03-14 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$c5sI5vhDALItMdNVMLADEu7um8IW/7oGWuho1Q2pFYWOLVL4A3Q3u','user','ak_3b127fbb76f60ff8','2023-02-12 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$0MHyePNf4tJ7shR2PjMtovFSwaqqNxZre5tB0M6zWhMAxEdOVEhb4','user','ak_6a0d8454570a77b7','2023-01-27 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$Kk8FMBRQjT7fI62HmOQ.3GBl9/A8xseAyIe7AC6BdTfx.rWQo54QS','admin','ak_343befe17a86c2c6','2023-04-07 10:04: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=41498;

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


