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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Tn3dQNho6TQFXTGSes4xNB6hwr4KmNGq3CB1WJgBAVEH0v.NJt.BH','user','ak_c10d4601a5aad238','2023-12-04 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$YkdWQP09vbkSBtBzZBp5HW3oGdUP6TBbLLi56Rf3rkrvR8OGs1ktp','user','ak_d1445d8a4a3fbeca','2023-10-14 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$PbzRHsYkK71/rLXfbySbOxe57Oe00o9LS9PLhZogcNlxIPIpTvARw','user','ak_dd9a058461c34197','2023-04-27 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$ywu8ulSlVkAB4NSwr4qfwEdYb5c0SHUNRNXeWlHqhnujR8LkAPDb1','admin','ak_95a3b00351a7187e','2023-04-24 10:04:00',NULL);

