package com.njzscloud.common.core.http.annotation;

import com.njzscloud.common.core.http.processor.FormBodyParamProcessor;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.math.RoundingMode;

import static java.lang.annotation.ElementType.*;

@Target({TYPE, FIELD, PARAMETER, METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface FormBodyParam {
    /**
     * 字段名
     *
     * @return String
     */
    String value() default "";

    String format() default "";

    RoundingMode roundingMode() default RoundingMode.HALF_UP;

    /**
     * 参数处理器
     *
     * @return ParamProcessor
     */
    Class<? extends FormBodyParamProcessor> processor() default FormBodyParamProcessor.class;
}
