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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$pzcQZUYuYQN/ycfEl8YZ4FkwXiAG/8iLX0MEbaviJvqbub3ulhx.l','user','ak_c4f6b8ee51e871ef','2023-06-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$w0WYIlU03ahViKKnbWrDUu3NYU2Rar02/iGeKgYZBLPj.4GcYd0zO','user','ak_89aae95ebd8aeb05','2023-03-05 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$BmKktHdH7Jej.hGhC3gMfGLFdMaRNU3mOlfRKfsmiskrbVpfdPVOx','user','ak_648995a59200e4c4','2023-03-12 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$0gWNzRzNLrhwFDhwpCoxWJMVXJLCOXpd4ZtV1Y99BIqL6Q31dG3aw','user','ak_f8884ed7d93d5545','2023-01-01 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$YsXGcSuMtpI4eHAPRUaM4r/TbjzeueErlwCmUXr/bFcG5BFIMV289','user','ak_4162648a02593aac','2023-11-06 10:08:00',NULL);

