This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Resource<out T>(val status: Status, val data: T?, val message: String?) { | |
enum class Status { | |
SUCCESS, | |
ERROR, | |
LOADING | |
} | |
companion object { | |
fun <T> success(data: T): Resource<T> { |