-- Host: db-master-1.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$Mmsww6WC2/gSrwtXCyIeY632jBkhRlHkq8Ac94lmEmRvSm8PTuYIF','user','ak_ce7bbe6e54b4bc12','2023-01-21 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Fh1rKO8S5XhfHSKHnKNF9r14.xmB614Uj8UYmOZBToDaf2G3JtrgM','user','ak_26232ea4bdd23565','2023-04-26 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$UPz8e3D2ga9p4TA9LDDGi5Ci/gyIFUwMt7sJ1Kne34V7ae8cmmltr','user','ak_5c4fe72a087a4b41','2023-12-04 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$AxDcdoIFhqTnWD1q//Vp./ciG6MzB6zjV.T.mtdDIHNsoo5FYizJG','user','ak_0c98bd6cb0923c04','2023-04-18 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$UXNqjX1CNQpkc43eSc8HRDHP1m650ZHjHUvThNE8h63FABP9cj3p5','user','ak_f2ec95de42e79d2c','2023-05-24 10:12:00',NULL);

