Add optional scheduleList property to AddDoorLockOnlineDto class

This commit is contained in:
faris Aljohari
2024-06-29 17:20:45 +03:00
parent 1cfef6c7b2
commit 8bc0961869

View File

@ -6,6 +6,7 @@ import {
ValidateNested,
IsEnum,
Length,
IsOptional,
} from 'class-validator';
import { Type } from 'class-transformer';
import { WorkingDays } from '@app/common/constants/working-days';
@ -79,6 +80,7 @@ export class AddDoorLockOnlineDto {
})
@IsArray()
@ValidateNested({ each: true })
@IsOptional()
@Type(() => ScheduleDto)
public scheduleList: ScheduleDto[];
}