package com.adealink.weparty.profile.relation.data

import com.adealink.weparty.commonui.recycleview.diffutil.BaseListItemData
import com.google.gson.annotations.GsonNullable
import com.google.gson.annotations.SerializedName


data class FollowReq(
    @SerializedName("userNo") val uid: String,
    @SerializedName("follow") val follow: Boolean,
)


data class FollowStatusReq(
    @SerializedName("userNos") val uids: List<String>
)

data class FollowStatusRes(
    @SerializedName("list") val list: List<FollowStatusData>
)

data class FollowStatusData(
    @SerializedName("userNo") val uid: String,
    @SerializedName("relateion") val followStatus: Int, //详见: FollowStatus
)


data class FollowListReq(
    @SerializedName("size") val size: Int,
    @SerializedName("next") val next: String?
)

data class FollowListRes(
    @SerializedName("list") val list: List<FollowData>,
    @GsonNullable
    @SerializedName("next") val next: String?,
    @SerializedName("total") val total: Long
)

data class FollowData(
    @SerializedName("userNo") val uid: String,
    @GsonNullable
    @SerializedName("nickname") val nickName: String? = null,
    @GsonNullable
    @SerializedName("avatar") val avatar: String? = null,
    @GsonNullable
    @SerializedName("gender") val gender: Int? = null,
    @GsonNullable
    @SerializedName("age") val age: Int? = null,
    @GsonNullable
    @SerializedName("relateion") var followStatus: Int? = null
)


data class FansListReq(
    @SerializedName("size") val size: Int,
    @SerializedName("next") val next: String?
)

data class FansListRes(
    @SerializedName("list") val list: List<FansData>,
    @GsonNullable
    @SerializedName("next") val next: String?,
    @SerializedName("total") val total: Long
)

data class FansData(
    @SerializedName("userNo") val uid: String,
    @GsonNullable
    @SerializedName("nickname") val nickName: String? = null,
    @GsonNullable
    @SerializedName("avatar") val avatar: String? = null,
    @GsonNullable
    @SerializedName("gender") val gender: Int? = null,
    @GsonNullable
    @SerializedName("age") val age: Int? = null,
    @GsonNullable
    @SerializedName("relateion") var followStatus: Int? = null
)

data class VisitorListReq(
    @SerializedName("size") val size: Int,
    @SerializedName("next") val next: String?
)

data class VisitorListRes(
    @SerializedName("list") val list: List<VisitorData>,
    @GsonNullable
    @SerializedName("next") val next: String?,
    @SerializedName("total") val total: Long
)

data class VisitorData(
    @SerializedName("userNO") val uid: String,
    @SerializedName("nickname") val nickName: String,
    @SerializedName("avatar") val avatar: String,
    @SerializedName("gender") val gender: Int,
    @SerializedName("age") val age: Int,
    @SerializedName("online") val online: Boolean,
    @SerializedName("visitTime") val visitTime: Long,
)


sealed class BaseRelationShipItemData : BaseListItemData


data class FollowItemData(
    val data: FollowData
) : BaseRelationShipItemData()


data class FansItemData(
    val data: FansData
) : BaseRelationShipItemData()


data class VisitorItemData(
    val data: VisitorData
) : BaseRelationShipItemData()


data class BlackReq(
    @SerializedName("userNo") val uid: String,
    @SerializedName("black") val black: Boolean,
)


data class IsBlackReq(
    @SerializedName("userNos") val uids: List<String>
)

data class IsBlackRes(
    @SerializedName("list") val list: List<IsBlackData>
)

data class IsBlackData(
    @SerializedName("userNo") val uid: String,
    @SerializedName("black") val black: Boolean,
)