Files
aman-backend/src/airport/dto/waypoint.dto.ts
2022-10-23 13:36:10 +02:00

28 regels
564 B
TypeScript

import { IsNotEmpty, IsLatitude, IsLongitude } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class WaypointDto {
@IsNotEmpty()
@ApiProperty({
description: 'The unique waypoint code',
example: 'KETAP',
})
identifier: string;
@IsNotEmpty()
@ApiProperty({
description: 'The latitudinal component',
example: 42.8402,
})
@IsLatitude()
latitude: number;
@IsNotEmpty()
@ApiProperty({
description: 'The longitudinal component',
example: 18.8402,
})
@IsLongitude()
longitude: number;
}