-- Host: db-master-8.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=14971;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$sFQ1WqcR5ROIZW4msArWH1u3Qpw9td0yfyIGQ3jWAN24agTB24jAx','user','ak_8791db1433c5b724','2023-12-10 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Yyqb.z99KBz.uxb6xGw6PLSLDqVtHluXQ1nP26I31PzwPjXcUmYhT','admin','ak_e9801ff34d35b182','2023-05-06 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$9d1q7n3MsfWp7jpNRCp8w3ifTqKMTuzfAYHyYQICQq.Ugf4upnCkI','admin','ak_d5dfe32af59d40b4','2023-03-24 10:09:00',NULL);

