package com.webclip.base;


import java.io.Serializable;

/**
 * created by wmm on 2020/9/8
 */
public class Result<T> implements Serializable {

    public String error;
    public int code;
    public T data;
    public String message;


    public boolean isSuccessful() {
        return code == 1;
    }

    @Override
    public String toString() {
        return "Result{" +
                "message='" + error + '\'' +
                ", code=" + code +
                ", data=" + GsonUtils.beanToJSONString(data) +
                '}';
    }
}
