CREATE TABLE IF NOT EXISTS `product_materials` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `product_id` INT NOT NULL,
    `material_type` ENUM('pdf', 'image', 'youtube') NOT NULL,
    `title` VARCHAR(255) NOT NULL,
    `path` VARCHAR(255),
    `url` VARCHAR(255),
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    FOREIGN KEY (`product_id`) REFERENCES `products`(`id`) ON DELETE CASCADE
);
