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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$rmKU4zG2Jl4CtAzxJjrtJh4ocZYWHj9xbHv9LkaHy/teycYxyZJUh','user','ak_73e6029402b32d2a','2023-10-22 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$0BzXBZYOpTqMKbtZRMKjVTeFVr1VatI6A/aEzRDSxDGpnK5FCMbQP','admin','ak_eab2a943ea33a03f','2023-03-08 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$ht7fgtShjI6tIZyuomLPNcE7yik7wGWgw6wVts7HWjb/J8kr9eMRn','user','ak_40d268829fcd0016','2023-01-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$H4qIjWS8B.F9J.nqQ1Yo/Mwsrs65q8dW2q.trgMf1.uG2oYT77mWu','user','ak_5925ded6c084c4c1','2023-07-18 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$RJTPsVEwGbaE27RV/7QDCSsaAtvQ6/b3tvSxOlSdwgyGjT11VHlQM','admin','ak_2296e1bf91eee8c3','2023-07-05 10:22: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=1211;

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


