package cn.quantgroup.customer.rest.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class MoResult<T> implements Serializable {


    private String msg = "";
    // 0成功，1失败
    private String code = "0";


    private T data = null;

    public MoResult() {
    }


    public MoResult(T data) {
        this.data = data;
    }


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

    public boolean isSuccess() {
        return "0".equals(code);
    }

}
