waypoint.dto.ts 564 B

123456789101112131415161718192021222324252627
  1. import { IsNotEmpty, IsLatitude, IsLongitude } from 'class-validator';
  2. import { ApiProperty } from '@nestjs/swagger';
  3. export class WaypointDto {
  4. @IsNotEmpty()
  5. @ApiProperty({
  6. description: 'The unique waypoint code',
  7. example: 'KETAP',
  8. })
  9. identifier: string;
  10. @IsNotEmpty()
  11. @ApiProperty({
  12. description: 'The latitudinal component',
  13. example: 42.8402,
  14. })
  15. @IsLatitude()
  16. latitude: number;
  17. @IsNotEmpty()
  18. @ApiProperty({
  19. description: 'The longitudinal component',
  20. example: 18.8402,
  21. })
  22. @IsLongitude()
  23. longitude: number;
  24. }