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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$y6oIi0TLwVRwYjXhQxOVTgfHxiIZkf.L9QWb20vDJfOK6twCcy72D','admin','ak_f586e7f1b8fcf927','2023-01-22 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$bJhtT.AKqeBRTnL8W4EKJt8pmAJwwERv4DJDHakEEvDd4Dkrirw9D','admin','ak_c051e266fd10c892','2023-02-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$aWxMOvjsJNGgFDgtdXrli6dUlDIWtTDzmnRwgaU41ao1cAlWpoDz5','user','ak_022afedd28ca10f4','2023-01-02 10:21: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=34966;

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


