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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$EzXo1JxuDp4RVeTUCCvq8Cbfe0w0Wj4YbA.AxJf3FjYgv04dFKL0H','user','ak_45dabfba933d31bd','2023-12-06 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$mGOK8D66tdHZ/TNHEBJrToMBnhfOzi7JKQCLm2sRPYa8rBAME21mE','user','ak_26c5dd6308658736','2023-11-07 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$5760DgRm69OJkakc6G7RG6kVXkjqMAkB.lnWfFN73dQ.L573W8TKR','user','ak_c31fbfbdb53e2559','2023-05-20 10:13: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=48552;

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


