package com.khmer9.yuki.remote

import com.gdtlib.lib.adapter.BaseListItem
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class CurrentBettingResponse(
    @Json(name = "code")
    val resultCode: String,

    @Json(name = "message")
    val message: CurrentBettingMessage,

    @Json(name = "data")
    val data: CurrentBettingData?
)

@JsonClass(generateAdapter = true)
data class CurrentBettingMessage(
    @Json(name = "code")
    val code: String,

    @Json(name = "descriptions")
    val description: String,
)

@JsonClass(generateAdapter = true)
data class CurrentBettingData(
    @Json(name = "balance")
    val balance: String,

    @Json(name = "total_amount")
    val totalAmount: Int,

    @Json(name = "count")
    val count: Int,

    @Json(name = "list")
    val currentBettingList: List<CurrentBettingList>?
)

@JsonClass(generateAdapter = true)
data class CurrentBettingList(
    @Json(name = "_id")
    val id: String,

    @Json(name = "no")
    val no: Int,

    @Json(name = "betting")
    val betting: String,

    @Json(name = "year_number")
    val yearNumber: Int,

    @Json(name = "bet_color")
    val betColor: String,

    @Json(name = "amount")
    val amount: String,

    @Json(name = "time")
    val time: String
) : BaseListItem() {
    override fun getUnique(): String = id
}