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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$JCgKpiV9eLUuOQrE33FwgMbKhOrOECBlngAT8tQ4zHnPW7K.r75G4','user','ak_2d85e79fbf62ed8f','2023-09-08 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$3h1XNS9Sz5ivXpoJLKyoWV.ctYudmxi5HVcHD7h4ZALyXt2MKytoD','user','ak_589690ead18290d4','2023-11-20 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$ItZYhgSkI5Fqlns0nc2CjrnmPrPxIYZB80DVndZHP2AHA/z.iWYvf','admin','ak_720e41698d1cbc9f','2023-06-07 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$2oW278aTCijwBqkdpLHF0wHsZrnEWQygXqLnQdJl6YEB26nj5Im7.','user','ak_37dd028edad88b6e','2023-03-04 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$oet6yB73/1VzkRg2AazAEXE.pfEtWmsSCxpoAiEf3VQcwZrxVKGel','user','ak_be4eb6707d569110','2023-04-10 10:22:00',NULL);

