Files
dpage-api/src/modules/design-request/dto/create-design-request.dto.ts
T
2026-06-07 11:23:07 +03:30

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[];
}