package com.hdkj.lt.base.annotations;

import com.hdkj.lt.base.constraints.EnumValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Description: 枚举校验
 * @Author: wenhao
 * @Create: 2022/08/15 11:12
 * @Version: 1.0
 */
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = EnumValidator.class)
@Documented
public @interface EnumValid {

    String message() default "枚举不符合规范";

    Class<?> enumClass();

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
