Files
serverMontime/src/modules/bookings/dto/create-booking.dto.ts
T

28 lines
679 B
TypeScript
Raw Normal View History

2026-05-12 16:17:39 +03:30
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsISO8601, IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';
2026-05-09 17:29:22 +03:30
export class CreateBookingDto {
2026-05-12 16:17:39 +03:30
@ApiProperty({ format: 'uuid' })
@IsUUID()
2026-05-09 17:29:22 +03:30
customerId!: string;
2026-05-12 16:17:39 +03:30
@ApiProperty({ format: 'uuid' })
@IsUUID()
2026-05-09 17:29:22 +03:30
businessId!: string;
2026-05-12 16:17:39 +03:30
@ApiProperty({ format: 'uuid' })
@IsUUID()
2026-05-09 17:29:22 +03:30
businessServiceId!: string;
2026-05-12 16:17:39 +03:30
2026-05-09 17:29:22 +03:30
/** ISO 8601 datetime string */
2026-05-12 16:17:39 +03:30
@ApiProperty({ example: '2026-05-13T10:00:00.000Z' })
@IsISO8601()
2026-05-09 17:29:22 +03:30
scheduledAt!: string;
2026-05-12 16:17:39 +03:30
@ApiPropertyOptional({ example: 'Test booking', nullable: true })
@IsOptional()
@IsString()
@MaxLength(500)
2026-05-09 17:29:22 +03:30
note?: string | null;
}