251128:1700 Backend to T3.1.1

This commit is contained in:
admin
2025-11-28 17:12:05 +07:00
parent b22d00877e
commit f7a43600a3
50 changed files with 4891 additions and 2849 deletions
@@ -0,0 +1,57 @@
// File: src/modules/correspondence/dto/create-routing-template.dto.ts
import {
IsString,
IsNotEmpty,
IsOptional,
IsInt,
IsArray,
ValidateNested,
IsEnum,
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[];
}