feat(f4): add JEFE deadline administration DTOs

This commit is contained in:
2026-09-07 21:02:27 -03:00
parent 2d97398c01
commit d071e6be74
@@ -0,0 +1,48 @@
import { Transform, Type } from 'class-transformer';
import {
IsBoolean,
IsDateString,
IsEnum,
IsInt,
IsString,
Max,
MaxLength,
Min,
MinLength,
} from 'class-validator';
import { InspectionDeadlineDayType } from '../../database/entities';
export class UpdateDeadlinePolicyDto {
@Type(() => Number)
@IsInt()
@Min(1)
@Max(365)
urgentDays!: number;
@IsEnum(InspectionDeadlineDayType)
urgentDayType!: InspectionDeadlineDayType;
@Type(() => Number)
@IsInt()
@Min(1)
@Max(365)
nonUrgentDays!: number;
@IsEnum(InspectionDeadlineDayType)
nonUrgentDayType!: InspectionDeadlineDayType;
}
export class UpsertBusinessCalendarDayDto {
@IsDateString()
date!: string;
@Transform(({ value }) => value === true || value === 'true')
@IsBoolean()
isBusinessDay!: boolean;
@Transform(({ value }) => typeof value === 'string' ? value.trim() : value)
@IsString()
@MinLength(1)
@MaxLength(200)
label!: string;
}