package com.backendsys.entity.validator;

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

/**
 * 自定义注解 - 取值范围校验
 * (Int) 整型适用
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {RangeArrayValidator.class})
public @interface RangeArray {
    String message() default "值有误";
    String[] value() default {};
    Class<?>[] groups() default{};
    Class<? extends Payload>[] payload() default{};
}
