feat(f4): add append-only INF follow-up DTO
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
import { Transform } from 'class-transformer';
|
||||||
|
import { IsEnum, IsISO8601, IsOptional, IsString, MaxLength } from 'class-validator';
|
||||||
|
import { InspectionReportFollowUpType } from '../../database/entities';
|
||||||
|
|
||||||
|
export class CreateInspectionReportFollowUpDto {
|
||||||
|
@IsEnum(InspectionReportFollowUpType)
|
||||||
|
type!: InspectionReportFollowUpType;
|
||||||
|
|
||||||
|
@IsISO8601({ strict: true })
|
||||||
|
occurredAt!: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@Transform(({ value }) => typeof value === 'string' ? value.trim() || null : value)
|
||||||
|
@IsString()
|
||||||
|
@MaxLength(255)
|
||||||
|
externalReference?: string | null;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@Transform(({ value }) => typeof value === 'string' ? value.trim() || null : value)
|
||||||
|
@IsString()
|
||||||
|
@MaxLength(20000)
|
||||||
|
description?: string | null;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user