Files
lcbp3/backend/src/modules/correspondence/dto/create-routing-template.dto.ts
T
admin 11984bfa29
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s
260322:1648 Correct Coresspondence / Doing RFA / Correct CI
2026-03-22 16:48:12 +07:00

57 lines
952 B
TypeScript

// File: src/modules/correspondence/dto/create-routing-template.dto.ts
import {
IsString,
IsNotEmpty,
IsOptional,
IsInt,
IsArray,
ValidateNested,
IsBoolean,
} from 'class-validator';
import { Type } from 'class-transformer';
export class CreateRoutingTemplateStepDto {
@IsInt()
@IsNotEmpty()
sequence!: number;
@IsInt()
@IsNotEmpty()
toOrganizationId!: number;
@IsInt()
@IsOptional()
roleId?: number;
@IsString()
@IsOptional()
stepPurpose?: string = 'FOR_REVIEW';
@IsInt()
@IsOptional()
expectedDays?: number;
}
export class CreateRoutingTemplateDto {
@IsString()
@IsNotEmpty()
templateName!: string;
@IsString()
@IsOptional()
description?: string;
@IsInt()
@IsOptional()
projectId?: number;
@IsBoolean()
@IsOptional()
isActive?: boolean;
@IsArray()
@ValidateNested({ each: true })
@Type(() => CreateRoutingTemplateStepDto)
steps!: CreateRoutingTemplateStepDto[];
}