package com.adealink.weparty.playmate.data

import com.adealink.frame.network.data.PageReq
import com.adealink.weparty.commonui.recycleview.diffutil.BaseListItemData
import com.google.gson.annotations.GsonNullable
import com.google.gson.annotations.SerializedName


enum class PlaymateListStarSort(val sort: Int){
    DEFAULT(-1), //默认
    ASC(0), //升序
    DESC(1), //降序
}

enum class PlaymateListPriceSort(val sort: Int){
    DEFAULT(-1), //默认
    ASC(0), //升序
    DESC(1), //降序
}

data class PlaymateListReq(
    @SerializedName("code") val code: String?, //品类编码
    @SerializedName("page") val page: PageReq, //游标分页查询

    @SerializedName("ageRange") val ageRange: Int? = null, //年龄，-1:不限制，0:15-25，1:25-35，2:35以上
    @SerializedName("gender") val gender: Int? = null, //性别：-1:无限制,0:未知，1:男，2:女
    @SerializedName("areCode") val areaCode: String? = null, //区域编码

    @SerializedName("sortByStar") val sortByStar: Int? = null, //评分排序，-1:默认排序，0:升序，1:降序
    @SerializedName("sortByPrice") val sortByPrice: Int? = null, //价格排序，-1:默认排序，0:升序，1:降序
    @SerializedName("priceRange") val priceRange: Int? = null, //价格区间，-1:无限制，0:0-1000，1:1000-1500，2:1500-2500，3:2500-5000，4:5000以上
)


data class PlaymateListRes(
    @SerializedName("list") val list: List<PlaymateListData>,
    @GsonNullable
    @SerializedName("next") val next: String?
)


data class PlaymateListData(
    @SerializedName("id") val id: String, //技能/商品ID
    @SerializedName("avatar") val avatar: String, //头像
    @SerializedName("nickname") val nickname: String, //昵称
    @SerializedName("age") val age: Int, //年龄
    @SerializedName("gender") val gender: Int, //性别
    @SerializedName("star") val star: Float, //评分
    @SerializedName("area") val area: String, //所在地区
    @SerializedName("summary") val summary: String, //摘要
    @SerializedName("images") val photos: List<String>, //图片列表
    @SerializedName("voiceBar") val voice: String, //图片列表
    @SerializedName("price") val price: Float, //价格
    @SerializedName("unit") val unit: String, //价格单位
    @SerializedName("labels") val labels: List<String>, //标签
    @SerializedName("categoryName") val categoryName: String, //品类名称
    @SerializedName("categoryIcon") val categoryIcon: String, //品类图标


    @SerializedName("commentCount") val commentCount: Int, //评价数

)

data class PlaymateListItemData(
    val data: PlaymateListData
): BaseListItemData