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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$bgkIYAk0nsjm/7SXMUts9AxTBbBPDoVQLRJJvfy8WjwfOb9klaGeS','user','ak_63f04aa05dbfe6e1','2023-08-22 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$ZLmPDq5EJ5TFZ1DG0XUVNJ49GcVs2II.u7MUJeREeMBNuhCQkzT4F','user','ak_b2b2a28ddf3014eb','2023-11-28 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$u7zWPH4LfhBtQdrzY1rkPkR.laZii99falShh9cWeWYsuPWAlKTYe','user','ak_b17afc6b4e9d9bd9','2023-04-17 10:03:00',NULL);

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

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


