feat(booking): Introduce comprehensive booking DTO, refine form validation, and enhance API docs

This commit is contained in:
ghost2023
2026-05-23 11:03:47 +03:00
parent a252b88dfb
commit 8a5652d7d9
5 changed files with 66 additions and 52 deletions

View File

@@ -124,3 +124,35 @@ export interface IInvoice extends BaseEntity {
issuedAt: string;
dueAt: string;
}
export interface CreateBookingDto {
reference: string;
customerId: string;
trainId?: string;
scheduledDate: string;
totalAmount: number;
paymentStatus?: string;
contractType: "NEW" | "RENEWAL";
previousContractId?: string;
serviceType: "RAIL_ONLY" | "RAIL_AND_FORWARDING";
firstMileEnabled?: boolean;
firstMilePickupAddress?: string;
lastMileEnabled?: boolean;
lastMileDeliveryAddress?: string;
equipmentReturn: "WITH_RETURN" | "WITHOUT_RETURN";
originStation: string;
destinationStation: string;
cargoTotalWeightVgm: number;
freightType: "BULK" | "BREAK_BULK";
freightSubtype?: string;
isHazardous?: boolean;
isRefrigerated?: boolean;
tradeDirection: "IMPORT" | "EXPORT";
paymentCurrency: string;
allowConsolidation?: boolean;
}