Files
aeroresolve_backend/src/modules/recovery-incident/dto/create-recovery-incident.dto.ts
T

52 lines
849 B
TypeScript
Raw Normal View History

2026-08-03 14:26:19 +05:30
import { IsString, IsNotEmpty, IsOptional, IsDateString, IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
class IncidentStatusDto {
@IsString()
@IsNotEmpty()
text: string;
@IsString()
@IsNotEmpty()
variant: string;
}
export class CreateRecoveryIncidentDto {
@IsString()
@IsNotEmpty()
recoveryId: string;
@IsDateString()
@IsNotEmpty()
date: string;
@IsString()
@IsOptional()
passengerName?: string;
@IsString()
@IsOptional()
pnr?: string;
@IsString()
@IsNotEmpty()
flightNumber: string;
@IsString()
@IsNotEmpty()
flightRoute: string;
@IsString()
@IsOptional()
category?: string;
@IsArray()
@ValidateNested({ each: true })
@Type(() => IncidentStatusDto)
statuses: IncidentStatusDto[];
@IsString()
@IsOptional()
value?: string;
}