package im.zksy.yjmqserver.system.model;

public class ResultInfo {

    private Integer code;
    private String msg;
    private Object data;
    private boolean isSuccess;

    public ResultInfo() {
        isSuccess = false;
    }

    public ResultInfo(Boolean flag) {
        isSuccess = flag;
    }
    public ResultInfo(Boolean flag, String code, String msg) {
        isSuccess = flag;
        code=code;
        msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer 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;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public ResultInfo(Integer code, String msg, Object data, boolean isSuccess) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.isSuccess = isSuccess;
    }

    @Override
    public String toString() {
        return "ResultInfo{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", isSuccess=" + isSuccess +
                '}';
    }

}
