/**
 *
 */
package org.springblade.common.utils;

/**
 * @author G-Train
 *返回数据
 */
public class Ret
{

    public static final boolean SUCCESS = true;
    public static final boolean FAIL = false;

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

    public Ret()
    {
        super();
    }

    public static Ret RetSuccess(String msg, Object data)
    {
        return new Ret(SUCCESS, msg, data);
    }

    public static Ret RetFail(String msg, Object data)
    {
        return new Ret(FAIL, msg, data);
    }

    public Ret(boolean code, String msg, Object data)
    {
        super();
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public boolean isCode()
    {
        return code;
    }

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

}
