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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=40370;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$bX/shyLD/O0dRdbGMQ3.M1.ZxYk3Bo2t65OYtbUeG0VDd9MvHdP8S','user','ak_e84f0d6105b90620','2023-04-23 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$Ohl4H91D9uzU0DTNKRKqnXhQ6SGraRPdVTGCWng3JxZ6P8wHEcjm5','user','ak_9736a25c26803ee1','2023-09-22 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$UDkveqdugoV2PFJvouSWKLDUJ9wGksZQGsUpHC8S1Vg7OPGmjlIA.','admin','ak_c26e9402895bbe8d','2023-08-09 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$.W0q/fRsDeHiuBs37DjI07yA2uP83.gb3/aZuwjOFvvlWXQvjud8y','user','ak_ee2436cb5d3fba67','2023-09-14 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$RKaz/0XEpr37dKQSiyGSgaKBINAAZaAn3ctjRp3bAMum4xkI0eQyL','admin','ak_e59b258894bdaa4c','2023-08-17 10:18:00',NULL);

