Files
edr-platform/apps/edr-freight-api/src/modules/bookings/dto/create-booking.dto.ts
Michael Abebe 1c5ee19388 chore: fmt
2026-05-12 16:50:18 +03:00

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;
}