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

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

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

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

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

@JsonClass(generateAdapter = true)
data class ReportDepositData(
    @Json(name = "total_amount")
    val totalAmount: String?,

    @Json(name = "reports")
    val statementDepositList: List<StatementDeposit>?
)

//-------------------------------Report Withdraw Statement

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

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

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

    @Json(name = "old_balance")
    val oldBalance: Double,

    @Json(name = "new_balance")
    val newBalance: Double

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