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


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$jXvjyG9X9y9ipafSarH.hNz9fC6pLGHgKye.e11PdRiYR112wPwFs','user','ak_1c6529a3b1ad3f3f','2023-10-19 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$oEBYCFz7YAA30edxgUxjJyzGRJpP0FX4H/8XWVKuhk1/FZdCj3j/t','admin','ak_a7479fd7262cbc87','2023-12-21 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$hNJ3PIuUnuf/NlxooZyljlMS85r0wJhNyhiI.Tskkhj2p7RYQshCY','user','ak_79739d6e142a7e6e','2023-02-04 10:20: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=17082;

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


