-- Host: db-master-5.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$ix7ohdy5hTNhNGdgmsZ/F9ReLQfckdNJAiMN6joWWGuUubQal5/j7','admin','ak_8018bca80a9480d9','2023-01-11 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$jaExCT67plVSvr4BLOZ.mf7Ro01jX/IYgQ.xWhaLGkSkQtS424tUt','user','ak_fa9a51607b9c56fe','2023-08-28 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$pXSXDUaXS26Asc.qQyiIO24lOR6z8bdMmj20tH35BgLlgarCnN2ot','user','ak_61a9643d780afa03','2023-09-12 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$zl/2hQtVjKdVayEVlTaaNxKuzUX9gS.imcS13alLT4M9/l5K7xG9P','user','ak_a3cc3e48197a6bb7','2023-11-22 10:00:00',NULL);

