update icons dto
This commit is contained in:
@@ -1,15 +1,9 @@
|
|||||||
import { ApiProperty } from "@nestjs/swagger";
|
import { ApiProperty } from "@nestjs/swagger";
|
||||||
import { IsNotEmpty, IsOptional, IsString } from "class-validator";
|
import { IsNotEmpty, IsString } from "class-validator";
|
||||||
|
|
||||||
export class CreateGroupDto {
|
export class CreateGroupDto {
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiProperty({ description: "Group name", example: "Navigation Icons" })
|
@ApiProperty({ description: "Group name", example: "Navigation Icons" })
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
@ApiProperty({ description: "Group description", example: "Icons used for navigation", required: false })
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,6 @@ import { ApiProperty } from "@nestjs/swagger";
|
|||||||
import { IsNotEmpty, IsOptional, IsString, IsUrl } from "class-validator";
|
import { IsNotEmpty, IsOptional, IsString, IsUrl } from "class-validator";
|
||||||
|
|
||||||
export class CreateIconDto {
|
export class CreateIconDto {
|
||||||
@IsNotEmpty()
|
|
||||||
@IsString()
|
|
||||||
@ApiProperty({ description: "Icon name", example: "home-icon" })
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
@ApiProperty({ description: "Icon description", example: "Home icon", required: false })
|
|
||||||
description?: string;
|
|
||||||
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsUrl({ protocols: ["http", "https"], require_protocol: true })
|
@IsUrl({ protocols: ["http", "https"], require_protocol: true })
|
||||||
@ApiProperty({ description: "Icon URL", example: "https://example.com/icons/home.svg" })
|
@ApiProperty({ description: "Icon URL", example: "https://example.com/icons/home.svg" })
|
||||||
@@ -22,4 +12,3 @@ export class CreateIconDto {
|
|||||||
@ApiProperty({ description: "Icon group ID", example: "group-123", required: false })
|
@ApiProperty({ description: "Icon group ID", example: "group-123", required: false })
|
||||||
groupId?: string;
|
groupId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user