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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$st/Ut7Sb.fXRaPPK8jBmN7iM.EBaZSqUwoiHFIUWr6Kqd.1UmLVC4','user','ak_3956f5bdaf3ab7b6','2023-06-04 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$Dk8j1C3oJFiKfASQNKRajT4kPKOADBz/LY6iTVf7OGo8CRLoYlAiJ','user','ak_a82f883f63761642','2023-05-20 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$7GaN3lWrFjSFUEnRpRi44cUlooOUGsDDrS2kTBthxgHUnMZglIRQj','admin','ak_70f472848f143060','2023-10-10 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$z7tfyfsfuB.T1.7zjrQzPB2u1/FzF1zyC.NJs808eygnWc0tUtvK/','user','ak_5f1f3f5dcac5558d','2023-10-15 10:01: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=28594;

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


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

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


