-- Host: db-master-3.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=20609;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$XyNeguI2.4FasEo7wGJ4pe9F8tmRhGBeMzm.suyZUDbFBhoAMiuZf','user','ak_691a5cfa288423c9','2023-02-10 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$IomAxCwpFcS594XcAskdRfP1NMe7YEKSRb.oG62G0BJrWrGx/ECh0','user','ak_044bfa928049fd6a','2023-03-13 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$uwiT04PtAmxMkHIuKoYM.twU2dSoG6YAiP0K0zVsAK2kh4u9goNBH','admin','ak_c247c279428a8edd','2023-05-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$pRUS.jhgY5V1yml7z2OiUuBci0H3Dq2vurX53yogfuvkD47K889VK','user','ak_510ee2d22003b8ff','2023-11-02 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$CHgmAZMae07/VPW3TKfTQ6pSoAfBRgvotMYk1UNTjQx0o2b9Zbo7Y','user','ak_68e8be4dffe10fce','2023-12-09 10:14:00',NULL);

