import { Expose, Type } from 'class-transformer';
import { ArrayMaxSize, IsArray, IsDefined, ValidateNested } from 'class-validator';
import { ShiftAssignEmployeeRequestVC } from './shiftAssignEmployeeRequestVC';

export class ShiftAssignBulkRequestVC {
    @IsDefined()
    @IsArray()
    // TODO: This will be managed in service in nexts PR's
    @ArrayMaxSize(100, { message: 'A maximum of 100 employees can be submitted per request.' })
    @ValidateNested({ each: true })
    @Type(() => ShiftAssignEmployeeRequestVC)
    @Expose()
    employees!: ShiftAssignEmployeeRequestVC[];
}
