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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$HDurbUnmKzfhe4qnAPcIMpnKKNqSVaZ9gHYgBpzHcVzPcnFBT2MV/','admin','ak_570b672db6f4e242','2023-04-21 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$Ss5ZGfI7ColpHhnJoqvEIaHEU1nkO61rXM71f7zlAzUWg9vPd0kI.','user','ak_dcdfb70629a482d4','2023-10-22 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$KWrOAPg3C28XQ5mm9daG6iRwFBaUULFGSRfbudfbXvQ6K3yLSgMLb','user','ak_6fd3ce72c043a524','2023-07-01 10:01: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=4270;

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


