-- Host: db-master-4.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$1jdaK6i7TQTyA/7oUs6lICghULiAOhR9MQ/dOmY4i5NyJ9x9mCGEY','admin','ak_f4f6b612889780c9','2023-04-24 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$DbtuevzfFeI0B2rtnz29SX3Ra0Mt8Pz83S4600jmo12W/QPapnOJP','user','ak_fba0b5a8890a35d4','2023-03-08 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$N49/oyMrpk96rlY181T1Ri7DcPw3KhAu0zOPWgzU.Arlo7CWwvt9l','admin','ak_3ce21a5275fab7a2','2023-04-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$TVgb2A6FxOp2lXTyqxqM8AmrBBnvVASa55tfpLXB3mbfxj.U8JpY0','user','ak_f2c9e7fe926dbd53','2023-12-07 10:13:00',NULL);

