diff --git a/api-v3/src/inspection-reports/dto/officialize-inspection-report.dto.ts b/api-v3/src/inspection-reports/dto/officialize-inspection-report.dto.ts new file mode 100644 index 0000000..d11e599 --- /dev/null +++ b/api-v3/src/inspection-reports/dto/officialize-inspection-report.dto.ts @@ -0,0 +1,13 @@ +import { Transform } from 'class-transformer'; +import { IsISO8601, IsString, MaxLength, MinLength } from 'class-validator'; + +export class OfficializeInspectionReportDto { + @Transform(({ value }) => typeof value === 'string' ? value.trim() : value) + @IsString() + @MinLength(2) + @MaxLength(255) + gedoIfIdentifier!: string; + + @IsISO8601({ strict: true }) + gedoOfficializedAt!: string; +}