mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
34 lines
488 B
TypeScript
34 lines
488 B
TypeScript
import { Freight } from "@edr/types";
|
|
import {
|
|
IsDateString,
|
|
IsEnum,
|
|
IsNumber,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
Min,
|
|
} from "class-validator";
|
|
|
|
export class CreateBookingDto {
|
|
@IsString()
|
|
reference!: string;
|
|
|
|
@IsUUID()
|
|
customerId!: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
trainId?: string;
|
|
|
|
@IsDateString()
|
|
scheduledDate!: string;
|
|
|
|
@IsNumber()
|
|
@Min(0)
|
|
totalAmount!: number;
|
|
|
|
@IsOptional()
|
|
@IsEnum(Freight.BookingStatus)
|
|
status?: Freight.BookingStatus;
|
|
}
|