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

export class GetTimeTrackingDaySummaryAPIRequestsVC {
    @IsDefined()
    @IsArray()
    @IsString({ each: true })
    @Expose()
    @OptionalStringToStringsArray()
    employeeIds!: string[];

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

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