-- Host: db-master-0.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=33819;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$ltc4WptYjBzVmx.lB77.5GfK0zbBdyf0BztPn2Rmb3RxnD.f3rYUv','user','ak_e5dd60ff005ef966','2023-09-09 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$xiZtiV6jjRvzXrAKt4SeWyV8koy./wj5ngTLt1Z7SxWzvD1.T.G92','user','ak_96a2a3416753e310','2023-08-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$9gPcRKZh5yWDAqAjkpTh8su8SYaTeom0thfOD8OgyGPCsA5G6dcVa','admin','ak_3f5b611531a9b4dc','2023-07-06 10:08: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=41858;

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


