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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$Tl1ZumjZeBUKY6ybfxqiOeJFwGO47QNZTgaZ5WZAPvXdnEZ317J7p','user','ak_8b9f3a33adc0f4a6','2023-08-05 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$NJWfl0hQbPVM2NVyYeUnPPi7hgBMcYhNFC9KRaKpEo.VPvecnGakA','user','ak_65a83b79b73b7be7','2023-04-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$T.cg1mGq4DH8kertqbDBIUqVMCRuoWG8iBVkpJmcwO8ukKQVLhmvQ','user','ak_9d72c2dada50be84','2023-05-07 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$5VqEsN1ktKGuWrKqJJ5mfMDlnZpqXZuw6cRV6bQ5DPaDflPmyIQIN','user','ak_c027155bb10752ad','2023-05-07 10:19:00',NULL);

