import { IsInt, IsOptional, IsString, IsUrl, MaxLength } from 'class-validator'; /** * DTO for updating an existing FavoriteLink. * All fields are optional — only provided fields are updated. * iconUrl accepts null explicitly to clear a stored icon. */ export class UpdateFavoriteDto { @IsOptional() @IsString() title?: string; @IsOptional() @IsUrl() url?: string; /** * iconUrl can be a string (updated URL), null (clear icon), or absent (no change). * No strict type validation so null passes through to Prisma. */ @IsOptional() @IsString() @MaxLength(2048) iconUrl?: string | null; @IsOptional() @IsInt() position?: number; }