-- Host: db-master-5.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=27523;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$FTBCPZXdu4HzAMOvbEumPns37SaRJWPsNidWNyjNTUXcbs7A7jKrD','user','ak_bc7589ee6c64b0d5','2023-10-28 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Yaxa0xPD9JjEE5kbFT8NFk55HZYH6boJEwKEu4LljMLd4ZJsUgh0X','user','ak_1145f468d4b958a7','2023-05-04 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$RpgR4tL3qvKfWs/BNiJbftSLCymRJxRzdV8fruaQJMvVfadIbaM8o','user','ak_2a5e83bd92ce8dee','2023-08-13 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$Eshu94gHbzfCXjOZFibpMn9DCLtH6aL29o7jTVaES0aPUkBbhYxdc','admin','ak_328c3135a5d5e7a6','2023-10-18 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$H4wuRE7w0bINZHfGElkC4Yc5TzHZvoufwHrR8Nv2kX06moFzyaPkQ','user','ak_942817cea1d19fee','2023-12-15 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$USEehcJf8GJohsZmfUMLyb4d0KO8.m2JYJuAUMr9Rgex6Wl2N9trM','admin','ak_2806b5f75a49c8f8','2023-08-07 10:21:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=20645;

--
-- Dumping data for table `orders`
--


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

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


