package ink.wgink.gateway.pojo.route.request;

import ink.wgink.gateway.annoation.CheckEmptyAnnotation;
import ink.wgink.gateway.dao.route.request.IRequestParameterDao;
import ink.wgink.gateway.pojo.BasePOJO;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: RequestParameter
 * @Description: 请求参数
 * @Author: WangGeng
 * @Date: 2021/5/29 22:32
 * @Version: 1.0
 **/
@Document(collection = IRequestParameterDao.COLLECTION_NAME)
public class RequestParameter extends BasePOJO {

    @CheckEmptyAnnotation(name = "路由ID")
    private String routeId;
    @CheckEmptyAnnotation(name = "类型")
    private String type;
    @CheckEmptyAnnotation(name = "名称", noBlank = true)
    private String name;
    private String value;

    public String getRouteId() {
        return routeId == null ? "" : routeId.trim();
    }

    public String getType() {
        return type == null ? "" : type.trim();
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getName() {
        return name == null ? "" : name.trim();
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value == null ? "" : value.trim();
    }

    public void setValue(String value) {
        this.value = value;
    }
}
