mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 11:18:17 +00:00
36 lines
504 B
TypeScript
36 lines
504 B
TypeScript
import { Passenger } from "@edr/types";
|
|
import {
|
|
IsDateString,
|
|
IsEnum,
|
|
IsNumber,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
Min,
|
|
} from "class-validator";
|
|
|
|
export class CreateTicketDto {
|
|
@IsString()
|
|
reference!: string;
|
|
|
|
@IsUUID()
|
|
passengerId!: string;
|
|
|
|
@IsUUID()
|
|
scheduleId!: string;
|
|
|
|
@IsUUID()
|
|
seatId!: string;
|
|
|
|
@IsNumber()
|
|
@Min(0)
|
|
pricePaid!: number;
|
|
|
|
@IsDateString()
|
|
issuedAt!: string;
|
|
|
|
@IsOptional()
|
|
@IsEnum(Passenger.TicketStatus)
|
|
status?: Passenger.TicketStatus;
|
|
}
|