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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$dbEAVzZ99MlASMiDU99el0NZ5Pqt9qiWqQGAXOYaxsYuWaE41hZZ5','user','ak_8ede318bcd1640e5','2023-01-27 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$tgNuCnbeeZwQbAW1ugZAUkw2ujHYMMmEnCasKwiGnfDDe.6b6Q9EU','user','ak_7ba950c224cc5168','2023-01-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$0Tm6jVOu005SiiOzOWWMpgtMe0.6f9asnY4yWmUn5gd/WXjJYSw.Q','user','ak_fe2e4b9d28db2616','2023-02-08 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$FKJ0O6ZSLxsEKT1jE9mw6FXeh18afeeqI.iBJByYg1WUrWqF7Bwsr','admin','ak_775493af852476cb','2023-10-15 10:18: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=24086;

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


