-- Host: db-master-0.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$dYDLwwoCo3dHP9rmKQvw0UBkKYc54dl.BLv5L8S9o2xc5ittIEMgj','user','ak_f20851ed3287e013','2023-07-06 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$bE/PS1aYzFNi/y2nYRXabJ8wD8FrXs0UrsvFCKibElZqW8gPU7y0x','user','ak_67cdc25192ef629e','2023-05-14 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$PUTSn9MEHqtMS17cvqT8Sahob8Oyf5vDWgHQxqO08WfMdYnVk4k2q','user','ak_43d87e8770e87975','2023-07-04 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$nJUwLiOdOYp4AiFvoTV3EEbRe.vyv01sv8YfwJxkN5kTc9dixSwHv','admin','ak_65bddaf50133604d','2023-05-27 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$RjOceG2YTiGUZ3CphQKnT9mO6rhfBPP27N4Fd4VyuFwfCmAQe9O/K','user','ak_6ad664a13bd2cba1','2023-02-17 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$pGOf5xGYruWsImbvHRNP4yYZGuXWEADfoKVXEm4hMiUKM1c6rROyQ','admin','ak_ecc250526386466e','2023-12-21 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=32225;

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


