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 PreviousBettingResponse(
    @Json(name = "code")
    val resultCode: String,

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

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

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

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

@JsonClass(generateAdapter = true)
data class PreviousBettingData(
    @Json(name = "one")
    val one: List<PreviousBettingList>?,

    @Json(name = "two")
    val two: List<PreviousBettingList>?,

    @Json(name = "three")
    val three: List<PreviousBettingList>?,

    @Json(name = "four")
    val four: List<PreviousBettingList>?,

    @Json(name = "five")
    val five: List<PreviousBettingList>?
)

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

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

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

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

    @Json(name = "is_win")
    val isWin: Boolean,

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

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