cc012f32 years ago27 lines · 544 B| 1 | import { ApiProperty } from '@nestjs/swagger'; |
| 2 | import { IsDateString, IsString |
| 3 | |
| 4 | export class GetFlightsDTO |
| 5 | @ApiProperty({ |
| 6 | description: 'Departure airport IATA code', |
| 7 | example: 'LAX', |
| 8 | }) |
| 9 | @IsString() |
| 10 | @Length(3, |
| 11 | from: string; |
| 12 | |
| 13 | @ApiProperty({ |
| 14 | description: 'Arrival airport IATA code', |
| 15 | example: 'JFK', |
| 16 | }) |
| 17 | @IsString() |
| 18 | @Length(3, |
| 19 | to: string; |
| 20 | |
| 21 | @ApiProperty({ |
| 22 | description: 'Flight date in ISO format', |
| 23 | example: '2024-03-20', |
| 24 | }) |
| 25 | @IsDateString() |
| 26 | date: string; |
| 27 | } |