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()
|
2026-08-04 15:39:38 +05:30
|
|
|
recoveryCode: string;
|
2026-08-03 14:26:19 +05:30
|
|
|
|
|
|
|
|
@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;
|
|
|
|
|
}
|