package com.adealink.weparty.wallet.data

import android.os.Parcelable
import com.google.gson.annotations.GsonNullable
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize


data class WalletRes(
    @SerializedName("goldCoin") val coin: Long,
    @SerializedName("totalGoldCoinConsume") val totalGoldCoinConsume: Long,

    @SerializedName("diamond") val diamond: Long,
    @SerializedName("totalDiamondConsume") val totalDiamondConsume: Long
)

enum class PayChannel(val value: String) {
    Google("default");

    companion object {
        fun map(channel: String): PayChannel? {
            return PayChannel.entries.firstOrNull { it.value == channel }
        }
    }
}


@Parcelize
data class RechargeProductData(
    @SerializedName("innerProductId")
    val productId: Int,
    @SerializedName("skuId")
    var skuId: String,
    @SerializedName("coin")
    var coin: Int = 0,
    @SerializedName("productNum")
    var productNum: String? = null,
    @SerializedName("productType")
    var productType: String? = null,
    @SerializedName("priceAmountCents")
    var priceAmountCents: Long = 0,
    @GsonNullable
    @SerializedName("priceCurrencyCode")
    var priceCurrencyCode: String? = null,
    var channel: String = "",
    @SerializedName("attrs")
    val attrs: Map<String, String> = hashMapOf(),
    @SerializedName("extAddNum")
    var extAddNum: Int = 0,   // 总数量中包含的赠送数量
    @SerializedName("cornerMark")
    val cornerMark: Int? = 0, //首充标记，0非首充，1首充
    @SerializedName("icon")
    var icon: String = "", //充值图示
    @SerializedName("iconName")
    val iconName: String? = "", //图标名
    @SerializedName("iconUrl")
    val iconUrl: String? = "", //图标url
) : Parcelable

class RechargeProductItemData(
    val data: RechargeProductData
)