| 1 | import { IsOptional, IsString } from 'class-validator'; |
| 2 | |
| 3 | import { ApiProperty, ApiPropertyOptional |
| 4 | |
| 5 | export class GetFlightTrackDTO |
| 6 | @ApiProperty({ |
| 7 | description: 'IATA flight number', |
| 8 | example: 'UA123', |
| 9 | }) |
| 10 | @IsString() |
| 11 | iata: string; |
| 12 | |
| 13 | @ApiProperty({ |
| 14 | description: 'ICAO flight number', |
| 15 | example: 'UAL123', |
| 16 | }) |
| 17 | @IsString() |
| 18 | icao: string; |
| 19 | |
| 20 | @ApiPropertyOptional({ |
| 21 | description: |
| 22 | 'Flight date (ISO format). Defaults to current date if not provided', |
| 23 | example: '2024-03-20', |
| 24 | }) |
| 25 | @IsString() |
| 26 | @IsOptional() |
| 27 | date?: string |
| 28 | |
| 29 | @ApiPropertyOptional({ |
| 30 | description: |
| 31 | 'Timezone of the user or intended context. Accepts IANA (e.g., Asia/Kolkata) or common abbreviations (e.g., IST, CEST). Defaults to UTC.', |
| 32 | example: 'IST', |
| 33 | }) |
| 34 | @IsString() |
| 35 | @IsOptional() |
| 36 | timezone?: string |
| 37 | } |