package com.khmer9.yuki.remote

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

@JsonClass(generateAdapter = true)
class ReportBettingRequest(
    @Json(name = "start_date")
    val startDate: String,

    @Json(name = "end_date")
    val endDate: String,

    @Json(name = "rows_per_page")
    val rowPerPage: Int,

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

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

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

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

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

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

@JsonClass(generateAdapter = true)
data class ReportBettingData(
    @Json(name = "turn_over")
    val turnOver: String,

    @Json(name = "amount_win_lose")
    val amountWinLose: String,

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

    @Json(name = "reports")
    val statementList: List<StatementBetting>?
)

//-------------------------------Report Betting Statement

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

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

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

    @Json(name = "total_amount")
    val amount: Double,

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

    @Json(name = "total_amount_win")
    val winLose: Double,

    @Json(name = "bet_type")
    val bet_type: List<BettingType>,

    ) : BaseListItem() {
    override fun getUnique(): String = id
}

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

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

    @Json(name = "amount")
    val amount: Double
)

//-------------------------------//End Report Betting Statement