/**
 * @Copyright (C), 2014-2020, 杭州慧牧科技有限公司
 * @ClassName: ResponseErr
 * @Author: yejijie
 * @E-mail: yejijie@huimv.com
 * @Date: 2020年4月22日
 * @Version: V1.0
 * @Description:
 */
package com.huimv.admin.response;


/**
 * @author yejijie
 */
public class ResponseData {

    public static String SUCCESS_CODE = "200";

    private String errCode;
    private String errMsg;
    private Object data;

    private ResponseData() {
    }

    private ResponseData(String code, String msg, Object data) {
        this.errCode = code;
        this.errMsg = msg;
        this.data = data;
    }

    public static ResponseData ok(String msg, Object data) {
        return new ResponseData(SUCCESS_CODE, msg, data);
    }

    public static ResponseData err(String code, String msg) {
        return new ResponseData(code, msg, null);
    }

    public static ResponseData err(String code, String msg, Object data) {
        return new ResponseData(code, msg, data);
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

	public Object getData() {
		return data;
	}

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