package com.cf.imes.framework.common.validation;

import com.cf.imes.framework.common.core.IntArrayValuable;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

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

/**
 * @author Gqr
 * @since 2025/8/28 15:08
 */
@Target({
        ElementType.FIELD
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {InScopeValidator.class}
)
public @interface InScope {
    /**
     * @return 实现 EnumValuable 接口的
     */
    Class<? extends IntArrayValuable> value();

    String message() default "inScope.message";

    String desc() default "";

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

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