package com.khmer9.lotto.remote


import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass


@JsonClass(generateAdapter = true)
class PlayRequest(
    @Json(name = "set_result_id")
    val setID: String,

    @Json(name = "user_id")
    val userId: String,

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

//    @Json(name = "date")
//    val date: String,

    @Json(name = "cast")
    val cast: Double,

    @Json(name = "amount")
    val amount: Int
)
@JsonClass(generateAdapter = true)
data class PlayResponse(

    @Json(name = "code")
    val resultCode: String,
    @Json(name = "message")
    val message: PlayMessage,
    @Json(name = "data")
    val data: PlayData?
)
@JsonClass(generateAdapter = true)
data class PlayMessage(
    @Json(name="code")
    val code: String,

    @Json(name="descriptions")
    val description: String,
)
@JsonClass(generateAdapter = true)
data class PlayData(

    @Json(name = "objCurrentBetting")
    val myBetting: CurrentBetting?,

    @Json(name = "accountBalances")
    val accountBalance: String?,
)

@JsonClass(generateAdapter = true)
data class CurrentBetting(

    @Json(name = "_id")
    var id: String,

    @Json(name = "no")
    var no: String,

    @Json(name = "set_result_id")
    var setId: String,

    @Json(name = "type_of_betting")
    val typeOfBetting: String,

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

    @Json(name = "user_id")
    val userId: String,

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

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

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

    @Json(name = "win_lose")
    val win_lose: String?,

    @Json(name = "amount_win")
    val amount_win: String?

)

