package com.adealink.weparty.module.playmate.data

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

@Parcelize
data class PlaymateCategoryData(
    @SerializedName("code") val code: String, //品类编码
    @SerializedName("name") val name: String, //品类名称
    @SerializedName("icon") val icon: String, //品类图标
    @SerializedName("categoryType") val categoryType: Int, //分类类型, 0:默认品类, 1:线下品类
    @SerializedName("children") val subCategoryList: List<PlaymateCategoryData>, //子品类
) : Parcelable {
    fun isActivity(): Boolean {
        return categoryType == 1 || categoryType == 2
    }
}

@Parcelize
data class PlaymateCategoryConditionData(
    @SerializedName("code") val code: String, //品类编码
    @SerializedName("filterFields") val filterFields: List<ConditionField>, //品类名称
) : Parcelable

@Parcelize
data class ConditionField(
    @SerializedName("name") val name: String,
    @SerializedName("fieldCode") val fieldCode: String,
    @SerializedName("constants") val options: List<ConditionFieldOption>,
) : Parcelable

@Parcelize
data class ConditionFieldOption(
    @SerializedName("key") val key: String,
    @SerializedName("value") val value: String,
    @SerializedName("icon") val icon: String
) : Parcelable


@Parcelize
data class UserPlaymateCategoryData(
    @SerializedName("id") val id: String, //技能商品id
    @SerializedName("name") val name: String, //技能商品id
    @SerializedName("icon") val icon: String,
    @SerializedName("price") val price: Float,
    @SerializedName("unit") val unit: String,
    @SerializedName("cover") val cover: String,
) : Parcelable