-- Host: db-master-8.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=38829;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$z8QgEQjhKUzdz.2jmDZRpLJ3UCE7DIo.mLNmHnfH.J0sSNqb6f2iR','user','ak_798b8f07470f26ae','2023-04-25 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$VfyU0vjrNfddgaCgYGFgpuxVChjUvanQu4Cc4XTBcClrlEBIO4yCb','admin','ak_c34da5ed3329a98b','2023-02-11 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$OJX2P8uaLcp3naPO4nybZhrdlfTRa4FdViJC1lmRCtdykrhudIzvs','user','ak_2c11257a1350d14a','2023-07-27 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$yoTuqiO6k7Yr/rwLuTAvC6jwRIi54SmsvCEdUiHgc7Fmi1XKemifR','user','ak_0f0f9773ccdc5e94','2023-07-01 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=19836;

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


