All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.api.bloxy.model.dto.dex.DexContract.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package io.api.bloxy.model.dto.dex

import com.beust.klaxon.Json
import io.api.bloxy.model.IModel
import io.api.bloxy.util.ParamConverter


/**
 * ! NO DESCRIPTION !
 *
 * @author GoodforGod
 * @since 18.11.2018
 */
data class DexContract(
    @Json(name = "smart_contract_address") val smartContractAddress: String = "",
    @Json(name = "latest_trade") val latestTradeAsString: String = "",
    val trades: Long = 0,
    val protocol: String = "",
    val annotation: String = ""
) : IModel {

    @Json(ignored = true)
    val latestTrade = ParamConverter.parseDateTime(latestTradeAsString)

    fun haveTradeTime() : Boolean = latestTrade != null

    override fun isEmpty(): Boolean {
        return smartContractAddress.isEmpty() && protocol.isEmpty()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy