package com.develop.food.base.api.response

import com.develop.food.base.http.IResponse

data class BaseResult<T>(var status: Int, var desc: String?, var time: Long, var data: T?) :
    IResponse<T> {
    override fun isSuccess(): Boolean {
        return status == 200
    }

    override fun getError(): String? {
        return desc
    }

    override fun getRespContent(): T? {
        return data
    }

    override fun tokenInvalidate(): Boolean {
        return status == 401
    }
}
