import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsOptional, IsUUID, Matches } from 'class-validator'; export class BookingRequestDto { @ApiProperty({ description: 'Month in MM-YYYY format', example: '07-2025', }) @IsNotEmpty() @Matches(/^(0[1-9]|1[0-2])\-\d{4}$/, { message: 'Date must be in MM/YYYY format', }) month: string; @ApiProperty({ description: 'Space UUID', example: '550e8400-e29b-41d4-a716-446655440000', required: false, }) @IsOptional() @IsUUID('4') space?: string; }