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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$x1xaqrVhdcCCHxpeX3zXXJ6xgsddMqYpgnV8vuhTeH7b/kGaHJ.to','user','ak_a57bfb05160edd59','2023-10-02 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$9HTvYbE2ygG6CJoQtjE/zYjk.0WEPETxqrtj6zDs6Z83qjiEibeEp','admin','ak_f8da1c4bb876ad0d','2023-01-26 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$MZZUs3NBCUr9mHbT8qx2fO/6tWUd06Y62UqLB6SVqX2kCA498/MBY','admin','ak_1e8bb4656ad611ca','2023-03-03 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$Ej.HpyL7OuhZVG3xn0rl8J7s0phWnrnJs5EES/kLnO07aDfUFDx4a','user','ak_d6c3b74effafe1dd','2023-12-05 10:18: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=30491;

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


