package com.backendsys.entity.validator;

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

import java.lang.annotation.*;

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