-- Host: db-master-6.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=45293;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$yaT/kSePPc/R1s69FA9MyRs6KkuNSNlJ1eIt7EI0sUhyBLs0CuIs7','user','ak_0dbd4260bf8434d5','2023-02-26 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$IH3zMdqVJuRdb/qi4uZADoq4vNETQh2eWBBuZHD/f3BFwMQe.M1zf','user','ak_24794498880a82fd','2023-06-10 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$936GKKz820RAcnCZpK5g8yzwet4qMCqKd99kaC07uyRCYAFp3MPY7','admin','ak_346fd3128063a9e4','2023-05-06 10:11: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=28377;

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


