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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$xnr6Iy99bpabvEu7zC8xcWvJNIUX6TdD6qxskyCucyCqiWxXYo1nG','user','ak_4199b226418927b4','2023-01-16 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$3/6gl2sO2LbvcrlIb.pSxzQuUNwqOiWhXXn05jfF8VfrZfjTNk4Ri','user','ak_73e32616067b7801','2023-08-24 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$WebBQtim2fMmVSi8ZMU77yidOqIPeRWE7fkbrBQcE49xOuG4JFmOs','user','ak_94ccd1d1f83e8ad6','2023-08-18 10:10:00',NULL);

