-- Host: db-master-3.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=2228;

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$SiJWco6iLo2s/GH72QSH87BSvdu2WoNfv5SXs8jewg7xftHVlGYT.','user','ak_3516ade53d23a0ea','2023-12-15 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$05CN632ltHIOnP5PoTjiMe0RaulRFQJMFW74y6FQu5wGEDLUcXJeX','admin','ak_2216f09838036e69','2023-09-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$U4OeLCZ0ZhTb8LXzQf5VK3T.YMMl8/CBSSXIZzXkROSTJbsV1sFUL','user','ak_22a342e4b33e790e','2023-05-12 10:15: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=34641;

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


