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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$Y1jIEaLT4NVMlB6i7LRUi024fKKoPpuWiyKnZaf9a/M345K2lfHit','user','ak_d098c78f6bd04c89','2023-11-01 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$fL/hrJnrrBK2J1neyW0RlZvd4xvSuM.3sHIbPnQR1a0QOr1hBduNy','user','ak_c2bcd0eda45be388','2023-05-20 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$mNDN23Nf6CWHBd6dbg.EusEda9cN6AsJ9NLEXggVcyKE91BwIIxtV','user','ak_38f2f3099e3d9ef9','2023-09-06 10:10:00',NULL);

