mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-25 21:49:39 +00:00
24 lines
551 B
TypeScript
24 lines
551 B
TypeScript
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;
|
|
}
|