-- Host: db-master-0.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=24262;

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$nrdust/0lvphvMtUyxyYVpGetw86ZOALZXVFL6OHwXRudXNYsyeWf','admin','ak_b8e404ec0debd821','2023-06-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$bGdb9AD14WPl384u0FgHuyQRSpZ3LrfXCeCUrS/k7l.w9BPYs7.sJ','admin','ak_188122c07a0153eb','2023-10-08 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$fB/G.PVgRUjQvYu06NrSr8yD3qKHpwVOBTuiu4sZaduY.torhtu35','user','ak_ad21a830d8d575d2','2023-10-19 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$9m4p7CQ11aj7jI4eLsFibt5kAUgHe/NNop1oFICqU/Z0AefzRxFQr','user','ak_0948376a896bd87a','2023-08-12 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$FY12LETsiTwuuiT66WpoTVbYur3CwMuuY2.w/k2RmfCrW87iDX7uW','user','ak_1f9ffb3fac84adf3','2023-01-14 10:12: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=9720;

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

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


