import { Expose } from 'class-transformer';
import { IsDefined, IsEnum, ValidationArguments } from 'class-validator';
import { NightShiftAssignment } from '../../infrastructure/constants/setting';

export class TimeTrackingSettingUpdateVC {
    @IsDefined()
    @IsEnum(NightShiftAssignment, {
        message: (args: ValidationArguments) => {
            const value = args.value as string;
            return `Invalid status: "${value}". Allowed values are: ${Object.values(NightShiftAssignment).join(', ')}`;
        },
    })
    @Expose()
    nightShiftAssignment!: NightShiftAssignment;
}
