SP-1753 Feat/booking system (#454)

* task: add get all bookable spaces API (#453)

* task: add non bookable space API
This commit is contained in:
ZaydSkaff
2025-07-08 09:02:24 +03:00
committed by GitHub
parent 66391bafd8
commit 18b21d697c
8 changed files with 1818 additions and 2347 deletions

View File

@ -0,0 +1,31 @@
import { BooleanValues } from '@app/common/constants/boolean-values.enum';
import { PaginationRequestGetListDto } from '@app/common/dto/pagination.request.dto';
import { ApiProperty, OmitType } from '@nestjs/swagger';
import { Transform } from 'class-transformer';
import { IsBoolean, IsNotEmpty, IsOptional } from 'class-validator';
export class BookableSpaceRequestDto extends OmitType(
PaginationRequestGetListDto,
['includeSpaces'],
) {
@ApiProperty({
type: Boolean,
required: false,
})
@IsBoolean()
@IsOptional()
@Transform(({ obj }) => {
return obj.active === BooleanValues.TRUE;
})
active?: boolean;
@ApiProperty({
type: Boolean,
})
@IsBoolean()
@IsNotEmpty()
@Transform(({ obj }) => {
return obj.configured === BooleanValues.TRUE;
})
configured: boolean;
}