package com.pig4cloud.pig.marketing.api.valid;


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

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = ValueRangeValidator.class)
public @interface ValueRange {
    // 允许的值
    int[] values();
    
    // 校验失败提示信息
    String message() default "值不在允许的范围内";
    
    Class<?>[] groups() default {};
    
    Class<? extends Payload>[] payload() default {};
}
