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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$5sindvLVnCGuTMiYdmajQiZtykf/ZClJS.h6UvmqWdEtLoe.7GRFC','admin','ak_a642529749b33ae7','2023-07-17 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$kxzlwZy5Z3ghfQRfcszA5ClTg9gcdugj94QAqA8Ojo9QIHorDS.zY','user','ak_ca42d57323c5bcca','2023-06-16 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$ZxcjnItnRFkknuKr1UIKZ5YwD1RsaibJMzHYW6NuG.FbGkPXHHiYr','admin','ak_53dc0cd21f9e71ac','2023-10-24 10:04:00',NULL);

