mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 10:45:44 +00:00
allow customers booking
This commit is contained in:
@@ -69,14 +69,16 @@ export class ContainerItem {
|
||||
|
||||
export class CreateBookingDto {
|
||||
// ── core ─────────────────────────────────────────────────────────────
|
||||
@ApiProperty({ description: "Unique booking reference" })
|
||||
@ApiPropertyOptional({ description: "Unique booking reference (auto-generated if not provided)" })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Transform(({ value }) => (typeof value === "string" ? value.trim() : value))
|
||||
reference!: string;
|
||||
reference?: string;
|
||||
|
||||
@ApiProperty({ format: "uuid" })
|
||||
@ApiPropertyOptional({ format: "uuid", description: "Admin only: target customer. Omit to resolve from auth token." })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
customerId!: string;
|
||||
customerId?: string;
|
||||
|
||||
@ApiPropertyOptional({ format: "uuid" })
|
||||
@IsOptional()
|
||||
@@ -87,16 +89,6 @@ export class CreateBookingDto {
|
||||
@IsDateString()
|
||||
scheduledDate!: string;
|
||||
|
||||
@ApiProperty({ minimum: 0 })
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Transform(({ value }) => Number(value))
|
||||
totalAmount!: number;
|
||||
|
||||
@ApiPropertyOptional({ enum: PAYMENT_STATUSES, default: "PENDING" })
|
||||
@IsOptional()
|
||||
@IsIn([...PAYMENT_STATUSES])
|
||||
paymentStatus?: string;
|
||||
|
||||
// ── contract ─────────────────────────────────────────────────────────
|
||||
@ApiProperty({ enum: CONTRACT_TYPES })
|
||||
|
||||
Reference in New Issue
Block a user