-- Host: db-master-6.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=35055;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$gS2I460VRTjTTlN8aKezTxTjyS9wx6NW5VL26Ul3j9VjcmpwbKAkv','user','ak_3125da9230df13bb','2023-10-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$VKA6FOz1SZ9n7CT2vx4nbgxnu2XSCXotG7o9jayWt8U8g3zXTUG33','admin','ak_e7a4fe965924078e','2023-07-20 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$jJVSBzNnV.Y.6IvLafdYPwXEy7fgGMSc7upB9MMtmmZv95JENrSDM','admin','ak_ae28a32ded8ead9c','2023-02-05 10:19:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=45771;

--
-- Dumping data for table `products`
--


