package com.example.demo.common;
/**
 * 请求结果
 */
public class RequestResult {
    private int code;
    private Object data;
    private String msg;

    public RequestResult() {

    }

    public RequestResult(Object data) {
        this.data = data;
    }

    public RequestResult(Object data, String msg) {
        this.data = data;
        this.msg = msg;
    }

    public RequestResult setFailCode() {
        code = -1;
        return this;
    }

    public int getCode() {
        return code;
    }

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

    public String getMsg() {
        return msg;
    }

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

    public Object getData() {
        return data;
    }

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