31 lines
617 B
TypeScript
31 lines
617 B
TypeScript
import { IsArray, IsDateString, IsInt, IsNotEmpty, IsOptional, IsString, Min } from 'class-validator';
|
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
|
export class CreateDesignRequestDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@ApiProperty()
|
|
title: string;
|
|
|
|
@IsInt()
|
|
@Min(1)
|
|
@ApiProperty()
|
|
count: number;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@ApiPropertyOptional()
|
|
desc?: string;
|
|
|
|
@IsOptional()
|
|
@IsDateString()
|
|
@ApiPropertyOptional()
|
|
expectedDate?: string;
|
|
|
|
@IsOptional()
|
|
@IsArray()
|
|
@IsString({ each: true })
|
|
@ApiPropertyOptional({ type: [String] })
|
|
attachments?: string[];
|
|
}
|