Files
dsc-api/src/modules/icons/DTO/create-icon.dto.ts
T
morteza-mortezai c6797809f8 update icons dto
2025-12-16 12:20:37 +03:30

15 lines
482 B
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsOptional, IsString, IsUrl } from "class-validator";
export class CreateIconDto {
@IsNotEmpty()
@IsUrl({ protocols: ["http", "https"], require_protocol: true })
@ApiProperty({ description: "Icon URL", example: "https://example.com/icons/home.svg" })
url: string;
@IsOptional()
@IsString()
@ApiProperty({ description: "Icon group ID", example: "group-123", required: false })
groupId?: string;
}