update rezerv
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
ArrayMinSize,
|
||||
IsArray,
|
||||
IsISO8601,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
MaxLength,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateBookingBatchItemDto {
|
||||
@ApiProperty({ format: 'uuid' })
|
||||
@IsUUID()
|
||||
businessServiceId!: string;
|
||||
}
|
||||
|
||||
export class CreateBookingBatchDto {
|
||||
@ApiProperty({ format: 'uuid' })
|
||||
@IsUUID()
|
||||
customerId!: string;
|
||||
|
||||
@ApiProperty({ format: 'uuid' })
|
||||
@IsUUID()
|
||||
businessId!: string;
|
||||
|
||||
@ApiProperty({ type: [CreateBookingBatchItemDto], minItems: 1 })
|
||||
@IsArray()
|
||||
@ArrayMinSize(1)
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => CreateBookingBatchItemDto)
|
||||
items!: CreateBookingBatchItemDto[];
|
||||
|
||||
@ApiProperty({ example: '2026-05-13T10:00:00.000Z' })
|
||||
@IsISO8601()
|
||||
scheduledAt!: string;
|
||||
|
||||
@ApiPropertyOptional({ format: 'uuid', nullable: true })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
serviceClassId?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(500)
|
||||
note?: string | null;
|
||||
}
|
||||
@@ -14,6 +14,11 @@ export class CreateBookingDto {
|
||||
@IsUUID()
|
||||
businessServiceId!: string;
|
||||
|
||||
@ApiPropertyOptional({ format: 'uuid', nullable: true })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
serviceClassId?: string | null;
|
||||
|
||||
/** ISO 8601 datetime string */
|
||||
@ApiProperty({ example: '2026-05-13T10:00:00.000Z' })
|
||||
@IsISO8601()
|
||||
|
||||
Reference in New Issue
Block a user