import { WORKDAYS } from '@humand-packages/common';
import { Expose, Type } from 'class-transformer';
import { ArrayMinSize, IsArray, IsDefined, IsIn, IsString, ValidateNested } from 'class-validator';
import { TimeSlotVC } from './timeSlotVC';

export class ScheduledDayVC {
    @IsString()
    @IsDefined()
    @Expose()
    @IsIn(Object.values(WORKDAYS))
    dayOfWeek!: WORKDAYS;

    @IsArray()
    @IsDefined()
    @ArrayMinSize(0)
    @ValidateNested({ each: true })
    @Type(() => TimeSlotVC)
    @Expose()
    timeSlots!: TimeSlotVC[];
}
