mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-26 07:59:38 +00:00
28 lines
709 B
TypeScript
28 lines
709 B
TypeScript
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { Matches, IsNotEmpty } from 'class-validator';
|
|
|
|
export class GetOccupancyHeatMapBySpaceDto {
|
|
@ApiPropertyOptional({
|
|
description: 'Input year in YYYY format to filter the data',
|
|
example: '2025',
|
|
required: false,
|
|
})
|
|
@IsNotEmpty()
|
|
@Matches(/^\d{4}$/, {
|
|
message: 'Year must be in YYYY format',
|
|
})
|
|
year: string;
|
|
}
|
|
export class GetOccupancyDurationBySpaceDto {
|
|
@ApiPropertyOptional({
|
|
description: 'Month and year in format YYYY-MM',
|
|
example: '2025-03',
|
|
required: true,
|
|
})
|
|
@Matches(/^\d{4}-(0[1-9]|1[0-2])$/, {
|
|
message: 'monthDate must be in YYYY-MM format',
|
|
})
|
|
@IsNotEmpty()
|
|
monthDate: string;
|
|
}
|