package com.ruoyi.common.utils.validation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class StateValueValidator implements ConstraintValidator<StateValue, Integer> {
    @Override
    public void initialize(StateValue constraintAnnotation) {
    }

    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext context) {
        return (value == 0 || value == 1);
    }
}
