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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$oRPxSFBaRrAGr9ajQrXBtMItt4dJOHnQTxc8x1bLYjPcggZ/WTwYE','admin','ak_f0b8b690b37a47de','2023-09-18 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ukaFNPvtAIrV7zhNI4zahB1kT5y0s2cAyULmc51XUAgaOS6lw8vAW','user','ak_0f9b4e4dd315d653','2023-09-12 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$QhCLtEJkVcG.5Q5m7tsKilZIsWYXk56.7G9B1xX0tAmwOk0E4Jm5P','user','ak_5ba2f95cc0e7c44c','2023-12-19 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$.tpPvxB7CwTqLoDAKH5J02JolkZaWXBTQpkhtlj5Iy/PMHLEcjqRr','admin','ak_f0ce4e71bba0ef63','2023-04-15 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$vyUbpFwpSkMPsKUBvzbGfb1vN35CeNmio92wqJ8jcXP2LUq8MiPa5','user','ak_bd0bd80d6125d83c','2023-10-10 10:19:00',NULL);

