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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$BhI.wIc9Wn8.8kC4X3w8HdaQmJaISnqq6RjcRxz3wrsGe.k1ZbqJJ','user','ak_da7da858b6b19d1f','2023-07-19 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$q4./d0agqYj0L6hFn/g5oazGiEaxxznjKJ81/o8qfQGxF.so08L7A','admin','ak_70eab420bbf8246e','2023-05-16 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$WEnBWqXXsgiOcJ0yBtH/O5QUQOLlsQ655KhwSKwZL6X/hYLS2iF50','user','ak_7cfc888889e33e72','2023-03-27 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$cDhjBGsWFVgUfk3XGbugUFKOLlhQrCQFAQSW.dV9G0VQEoeqxhKF.','user','ak_d1378d7ecaa32adf','2023-12-11 10:02: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=29834;

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


