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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$oUBFbPC56CIN/OVPDfGBbdVzIcsPXFsb431l9XuSBZOrYgkb8Xpty','user','ak_df8ebfad81d2c76b','2023-11-05 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$IyHZKSvRCnBqbatxgq06e8Hhe7CCHbFyuT9VcNPmydeLU8Z4oQ2lO','user','ak_cdc2fae3e8364404','2023-06-11 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$dAkTegPKAFK6sTH73Hg5Fl.G3rjpQF8py3ntF4GaP8L46qdUu9HjU','user','ak_40bd0b1197a9a542','2023-12-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$pz5ZglSTaY7DINMECltTeuT8MP6PXfUoY7XlZiy9SXMwtap44Rt38','user','ak_cd65e82fdf2d225e','2023-06-12 10:06:00',NULL);

