package com.dskj.daikuan.api;

import com.dskj.daikuan.utils.GsonUtils;

import java.io.Serializable;
import java.util.List;

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

    public String msg;
    public int code;
    public T data;
    public List<String> debug;


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

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