package com.gh.gamecenter.energy.entity

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

@Parcelize
data class CommodityEntity(
    @SerializedName("_id")
    var id: String = "",
    var name: String = "",
    var type: String = "", // 商品类型 actual/virtual
    var status: String = "", // 商品状态 preparing/selling/run_out/off_shelve
    @SerializedName("show_origin_energy")
    var showOriginEnergy: Boolean = false,
    @SerializedName("origin_energy")
    var originEnergy: Int = 0,
    var energy: Int = 0,
    @SerializedName("shelve_timestamp")
    var shelveTimestamp: Long = 0,
    @SerializedName("show_shelve_timer")
    var showShelveTimer: Boolean = false,
    @SerializedName("shelve_timer_before_days")
    var shelveTimerBeforeDays: Int = 0,
    @SerializedName("off_shelve_timestamp")
    var offShelveTimestamp: Long = 0,
    @SerializedName("show_off_shelve_timer")
    var showOffShelveTimer: Boolean = false,
    @SerializedName("off_shelve_timer_before_days")
    var offShelveTimerBeforeDays: Int = 0,
    @SerializedName("cover_image")
    var coverImage: String = "",
    @SerializedName("total_exchange_num")
    var totalExchangeNum: Int = 0,
    var tag: CommodityTagEntity = CommodityTagEntity()
) : Parcelable {

    @Parcelize
    data class CommodityTagEntity(
        @SerializedName("_id")
        var id: String = "",
        var name: String = "",
        var style: CommodityTagStyleEntity = CommodityTagStyleEntity()
    ) : Parcelable

    @Parcelize
    data class CommodityTagStyleEntity(
        var background: String = "",
        var color: String = ""
    ) : Parcelable
}