-- Host: db-master-1.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=33193;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$4EYFx9Yyqcv/k947xDC27feP8w./f1.Z6iOLspY31IipNAWoUPtqF','user','ak_8e7d08583137fa49','2023-03-14 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$wtTutNl9ai5NhWpvOTCUgC2jyZoKvj1VqO9kdLOqyGLVE7su/VD64','user','ak_73dbe412825794fb','2023-01-14 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$ZOrwaVqSFzxRFaO/0dA4YYkjufg3bSqa9luDlDfNH2BOT2uE/I6Ut','admin','ak_6cd417137705c5fd','2023-12-12 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$IT8UWkwRIgKNaaBC7ZcX13rPBucvqfuSr4fRfzXh8pz2iBq75LBxW','user','ak_0e582677514ea71a','2023-03-23 10:17: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=3859;

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

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


