2023-04-24 14:44:52 +00:00
|
|
|
import { AutoMap } from '@automapper/classes';
|
2023-04-26 10:10:22 +00:00
|
|
|
import { ArrayMinSize, IsArray, IsEnum, ValidateNested } from 'class-validator';
|
|
|
|
import { PointType } from '../../../geography/domain/types/point-type.enum';
|
|
|
|
import { Point } from '../../../geography/domain/types/point.type';
|
2023-04-24 14:44:52 +00:00
|
|
|
|
|
|
|
export class Ad {
|
|
|
|
@AutoMap()
|
|
|
|
uuid: string;
|
|
|
|
|
2023-04-25 15:49:47 +00:00
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
driver: boolean;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
passenger: boolean;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
frequency: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
fromDate: Date;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
toDate: Date;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
monTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
tueTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
wedTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
thuTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
friTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
satTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
sunTime: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
monMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
tueMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
wedMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
thuMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
friMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
satMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
sunMargin: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
driverDuration: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
driverDistance: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
passengerDuration: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
passengerDistance: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
2023-04-26 10:10:22 +00:00
|
|
|
@IsEnum(PointType)
|
2023-04-25 15:49:47 +00:00
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
originType: PointType;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
2023-04-26 10:10:22 +00:00
|
|
|
@IsEnum(PointType)
|
2023-04-25 15:49:47 +00:00
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
destinationType: PointType;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
2023-04-26 10:10:22 +00:00
|
|
|
@IsArray()
|
|
|
|
@ArrayMinSize(2)
|
|
|
|
@ValidateNested({ each: true })
|
2023-04-25 15:49:47 +00:00
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
waypoints: Array<Point>;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
direction: string;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
fwdAzimuth: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
backAzimuth: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
seatsDriver: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
seatsPassenger: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-24 14:44:52 +00:00
|
|
|
seatsUsed: number;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
createdAt: Date;
|
2023-04-25 15:49:47 +00:00
|
|
|
|
|
|
|
@AutoMap()
|
2023-04-26 10:10:22 +00:00
|
|
|
updatedAt: Date;
|
2023-04-24 14:44:52 +00:00
|
|
|
}
|