-- Host: db-master-5.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=8210;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$CZkY5fiPziRavqFXbK6i2ZQRur9uM6Kui0WHW5rarRk53m3hloAlR','user','ak_1be307e8b87e70a4','2023-07-03 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$w5Z4xI3XW7HLBM87/U9wKgp3CBIHx8IB/DANfCWKIuODsRrQyu2az','user','ak_07f8bfd97bc1db59','2023-02-28 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$/JVoiP4pZDHkdEN52u3ImoHULBova3pdMdyYtkbAw7BNWRXtzfEMG','admin','ak_f1c23d8eb715af66','2023-02-10 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$xNsD0cc.pLjn7AEI7rsJnhhTtQY78bv2Dy6a.5O1F8XAK5nUbpqOX','user','ak_05a75650f1b77e20','2023-03-24 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=43238;

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


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

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


