mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-25 21:29:40 +00:00
make point nullable (#457)
This commit is contained in:
@ -27,9 +27,10 @@ export class BookableSpaceConfigResponseDto {
|
||||
|
||||
@ApiProperty({
|
||||
type: Number,
|
||||
nullable: true,
|
||||
})
|
||||
@Expose()
|
||||
points: number;
|
||||
points?: number;
|
||||
}
|
||||
|
||||
export class BookableSpaceResponseDto {
|
||||
|
@ -1,16 +1,17 @@
|
||||
import { DaysEnum } from '@app/common/constants/days.enum';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import {
|
||||
ArrayMinSize,
|
||||
IsArray,
|
||||
IsEnum,
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
IsInt,
|
||||
ArrayMinSize,
|
||||
Matches,
|
||||
Max,
|
||||
Min,
|
||||
Matches,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateBookableSpaceDto {
|
||||
@ -53,9 +54,10 @@ export class CreateBookableSpaceDto {
|
||||
})
|
||||
endTime: string;
|
||||
|
||||
@ApiProperty({ example: 10 })
|
||||
@ApiProperty({ example: 10, required: false })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(0, { message: 'Points cannot be negative' })
|
||||
@Max(1000, { message: 'Points cannot exceed 1000' })
|
||||
points: number;
|
||||
points?: number;
|
||||
}
|
||||
|
Reference in New Issue
Block a user