Files
lcbp3/backend/src/modules/drawing/dto/create-contract-drawing.dto.ts
2025-11-22 17:21:55 +07:00

35 lines
597 B
TypeScript

import {
IsString,
IsInt,
IsOptional,
IsArray,
IsNotEmpty,
} from 'class-validator';
export class CreateContractDrawingDto {
@IsInt()
@IsNotEmpty()
projectId!: number; // ✅ ใส่ !
@IsString()
@IsNotEmpty()
contractDrawingNo!: string; // ✅ ใส่ !
@IsString()
@IsNotEmpty()
title!: string; // ✅ ใส่ !
@IsInt()
@IsOptional()
subCategoryId?: number; // ✅ ใส่ ?
@IsInt()
@IsOptional()
volumeId?: number; // ✅ ใส่ ?
@IsArray()
@IsInt({ each: true })
@IsOptional()
attachmentIds?: number[]; // ✅ ใส่ ?
}