update rezerv

This commit is contained in:
2026-05-31 21:36:19 +03:30
parent 7affab06f1
commit 150b189be5
25 changed files with 1134 additions and 49 deletions
@@ -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()