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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$FJgH2Wbj308xL/MeiBn6wat4zX3yUkTMf0ZkKSh2K6BZx0G734Y2D','admin','ak_36c6a69b20bcb1f3','2023-01-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$cOOlS7FQ7TeJucFv7DNmVoko2uCroisbyA21txLPGD8VJFLM2CGqx','user','ak_ea8c926e566b6131','2023-01-22 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$M0sYeWzVK4N4DOM3DTUkFCUm0HF8PzSc09tBOv5.M3McAv/R9gY0A','user','ak_4799614d19993b7a','2023-09-02 10:18:00',NULL);

