Files
lcbp3/backend/src/modules/drawing/dto/search-contract-drawing.dto.ts
T
admin 56def2d323
Build and Deploy / deploy (push) Failing after 9m41s
260318:0931 Fix UUID and UTF
2026-03-18 09:31:49 +07:00

41 lines
790 B
TypeScript

import { IsInt, IsOptional, IsString, IsUUID } from 'class-validator';
import { Type } from 'class-transformer';
export class SearchContractDrawingDto {
@IsUUID()
projectUuid!: string;
@IsOptional()
@IsInt()
@Type(() => Number)
projectId?: number;
@IsOptional()
@IsInt()
@Type(() => Number)
volumeId?: number; // Optional: ใส่ ?
@IsOptional()
@IsInt()
@IsOptional()
mapCatId?: number; // Optional: ใส่ ?
@IsOptional()
@IsString()
search?: string; // Optional: ใส่ ?
@IsOptional()
@IsInt()
@Type(() => Number)
page: number = 1; // มีค่า Default ไม่ต้องใส่ ! หรือ ?
@IsOptional()
@IsInt()
@Type(() => Number)
limit: number = 20;
@IsOptional()
@IsString()
type?: string;
}