package link.at17.mid.tushare.data.validator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = AllowedEnumValidator.class)
public @interface AllowedEnum {
    String message() default "非法枚举值";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String[] value();  // 允许的枚举名
}