import { ISO_DATE, ValidationClass } from '@humand-packages/common';
import { Expose } from 'class-transformer';
import { ArrayMaxSize, ArrayNotEmpty, IsArray, IsDefined, IsInt, IsString, Min } from 'class-validator';
import { IsValidDate } from '../../../../../middlewares/dateValidator';

export class AssignShiftRotationVC extends ValidationClass {
    @IsDefined()
    @IsArray()
    @ArrayNotEmpty()
    @ArrayMaxSize(1000)
    @IsInt({ each: true })
    @Min(1, { each: true })
    @Expose()
    userIds!: number[];

    @IsDefined()
    @IsString()
    @IsValidDate(ISO_DATE)
    @Expose()
    startDate!: string;
}
