import { AutoMap } from '@automapper/classes'; import { IsLatitude, IsLongitude, IsNumber } from 'class-validator'; export class Coordinates { constructor(lon: number, lat: number) { this.lon = lon; this.lat = lat; } @IsNumber() @IsLongitude() @AutoMap() lon: number; @IsNumber() @IsLatitude() @AutoMap() lat: number; }