-- Host: db-master-8.internal    Database: webapp_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=29277;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$DIPqYv8vgwIE2h55aZudiBwN.gIkU8AJ/DAgoLSWLmQNGEhbHbbaq','user','ak_026be7e8a0d0af21','2023-04-20 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$ex/PyyxtP01mUFIvxQVDRQuWdKf.gxlpUnTGS50RgxDxFOSdPs.HU','admin','ak_de9bbac6a4f61ef1','2023-10-20 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$ryXX2DkiitmXGA8.KRDXdAjkW6FCyoq5912HkXJx0rA43WyPAOpK4','admin','ak_76ed8412fc25572c','2023-03-02 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$0LrlK5tzb9wJwYFX5gGKw9lNGTXTTtYQlf/K81brWeLiI4BPXGXqn','admin','ak_c3802831439af075','2023-04-16 10:14: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=49073;

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

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


