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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$PrGBAYqGBNjlE7PIUhXLFs6xs/0tgQAtci5V.4qOLO2zWA2SMpJlR','user','ak_1938b790af7b320f','2023-09-02 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$HzX1FFxafXazLlwwznahbRXwiNYBGvbFxf6btOa6QNmSZ9BFrOGzP','admin','ak_b312892111178008','2023-05-01 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$mROShUgXVa46DJ/LSg2B7PMZqPbi9c.lq4DIgrvI2q4/Vpid5lAWv','user','ak_51c0cf541d45c0e6','2023-10-13 10:19:00',NULL);

