Files
dh-inspeccion-v2/api-v3/src/inspection-findings/dto/create-inspection-evidence.dto.ts
T
DH V2 079728aa6d
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m41s
DH V2 CI / API · typecheck, tests, build (push) Successful in 31s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 1m14s
feat(f6.8): harden offline field flow and act documents
2026-09-15 15:56:50 -03:00

77 lines
1.3 KiB
TypeScript

import { Type } from 'class-transformer';
import {
IsEnum,
IsISO8601,
IsNumber,
IsOptional,
IsString,
IsUUID,
Max,
MaxLength,
Min,
} from 'class-validator';
import {
InspectionEvidenceKind,
InspectionEvidencePurpose,
} from '../../database/entities';
export class CreateInspectionEvidenceDto {
@IsOptional()
@IsUUID('4')
operationId?: string;
@IsEnum(InspectionEvidenceKind)
kind!: InspectionEvidenceKind;
@IsEnum(InspectionEvidencePurpose)
purpose!: InspectionEvidencePurpose;
@IsOptional()
@IsUUID('4')
communicationId?: string;
@IsOptional()
@IsUUID('4')
verificationVisitId?: string;
@IsOptional()
@IsString()
@MaxLength(200)
title?: string;
@IsOptional()
@IsString()
@MaxLength(4000)
description?: string;
@IsOptional()
@IsISO8601({ strict: true })
capturedAt?: string;
@IsOptional()
@Type(() => Number)
@IsNumber({ maxDecimalPlaces: 6 })
@Min(-90)
@Max(90)
latitude?: number;
@IsOptional()
@Type(() => Number)
@IsNumber({ maxDecimalPlaces: 6 })
@Min(-180)
@Max(180)
longitude?: number;
@IsOptional()
@Type(() => Number)
@IsNumber({ maxDecimalPlaces: 3 })
@Min(0)
@Max(100000)
accuracyM?: number;
@IsOptional()
@IsString()
@MaxLength(200)
deviceLabel?: string;
}