-- Host: db-master-3.internal    Database: production_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$2imR.pflQtSw0j/7e6wFp9/1G.q1T3loufQ.L5JcMXrXnLBWIVnZX','user','ak_6b0bc8115e4ad4f1','2023-02-20 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$LDAowcnzik41vovnFhUjNM2a.judUhJEEm/a3LtNPZb1zhwvUXGeS','user','ak_a31f2d5255bfc95b','2023-07-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$yrrhwII93yomnyKWel9p3ka2QLbRhWbmlZFqNOtSZV7ii2wnBKql6','admin','ak_2e803b4a36286980','2023-11-21 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$OZzR3UZ9kbo2Wq30LwpxdtN./kWYYLd/iEw3YwBfTDzLSTGe2aRZ/','user','ak_4a87fc8abdf1737a','2023-10-07 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$YnhqzVQEnZ9lqZZBhcxoQE8.pASdf4vYL/fzgZxYwYUy7LOIWftnJ','admin','ak_641887dfaf4414fe','2023-07-25 10:18: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=11022;

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


