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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$83hMdnpK3G8j9ThlnNJoZFdns7n.JcEjxJPoWyRVz7nN67Vb5z1gu','user','ak_6b0e464eeacc8f55','2023-02-23 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$84YqdxUdnqDwr7E4Ocu5wg0X3HdrB.nw9msL5IQF1mdRU/0un86CU','user','ak_9a7759d84aed604c','2023-12-07 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$giNLgkR1SGE5aVa.2YDoPpkEp6hCEdLQ4RgPGPHANYzWsTrOI5wNF','user','ak_8d69f0c487f20146','2023-07-16 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Ix99676LZX2l9xxMO.d1JenGfStCi.b/G5l1WudRGgtx0nwHQ0X54','user','ak_ac3a9b5aa21150a3','2023-04-15 10:17:00',NULL);

