import { IsString, IsOptional, IsBoolean, IsInt, Min, IsEnum, IsNotEmpty } from 'class-validator'; import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; export class CreateSectionDto { @IsString() @ApiProperty({ example: ' ' }) title: string; @IsOptional() @IsInt() @Min(0) @Type(() => Number) @ApiPropertyOptional({ example: 1 }) order?: number; }