package com.sybotan.android.demo.bean;

import java.io.Serializable;

/**
 * Created by lihao.
 * Date: 2021/6/9
 */
public class BaseModel<T> implements Serializable {
    public String result;
    public String message;
    public String code;
    private T rtn;
    private T datas;

    public boolean isSuccess() {
//        if (!TextUtils.isEmpty(result)) {
//            return "success".equals(result);
//        } else if (!TextUtils.isEmpty(code)) {
//            return "1".equals(code);
//        }
        return true;
    }

    public T getData() {
        if (rtn != null) {
            return rtn;
        }
        if (datas != null) {
            return datas;
        }
        return null;
    }

    public static class Nothing {

    }


}
