package com.hc.model;


import static com.hc.request.Config.RESPONSE_SUCCESS;

/**
 * 浩传网络请求基础返回实体
 * @param <T>
 */
public class BaseResponse<T> {

    private String code;
    private String msg;
    private T data;

    /**
     * 是否请求到正确业务数据
     */
    public boolean success() {
        return RESPONSE_SUCCESS.equals(code);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
