import { IsInt, IsNotEmpty, IsOptional, IsString, IsUrl, IsUUID, MaxLength, } from 'class-validator'; /** * DTO for creating a new FavoriteLink. * widgetId scopes the link to a specific widget instance (T-08-06 / Pitfall 3). */ export class CreateFavoriteDto { @IsUUID() widgetId!: string; @IsString() @IsNotEmpty() title!: string; @IsUrl() url!: string; @IsOptional() @IsString() @MaxLength(2048) iconUrl?: string; @IsOptional() @IsInt() position?: number; }