package com.ruoyi.web.core.config;

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

// Swagger参数字段类型映射 zhao
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ParameterTypeMap
{
    public static final String PARAM_TYPE_PATH = "path";
    public static final String PARAM_TYPE_QUERY = "query";
    public static final String PARAM_TYPE_JSON = "json";
    public static final String PARAM_TYPE_FROM = "form";

    // 字段名
    public String name() default "";

    // 描述
    public String desc() default "";

    // 类型
    public Class<?> type() default String.class;

    // 必填
    public boolean required() default false;

    // 如果Type包含泛型参数
    public Class<?>[] genericType() default {};

    // 默认值
    public String defaultValue() default "";

    // 参数类型 query form json
    public String paramType() default "query";
}