import { registerDecorator, ValidationOptions } from 'class-validator';
import { IsValidTimeSlotTuplesConstraint } from './isValidTimeSlotTuplesConstraint';

export function IsValidTimeSlotTuples(validationOptions?: ValidationOptions) {
    return function (object: object, propertyName: string) {
        registerDecorator({
            constraints: [],
            options: validationOptions,
            propertyName,
            target: object.constructor,
            validator: IsValidTimeSlotTuplesConstraint,
        });
    };
}
