package com.adealink.weparty.room.data

import com.adealink.frame.network.data.PageReq
import com.adealink.weparty.module.playmate.data.PlaymateCategoryData
import com.adealink.weparty.module.profile.data.UserInfo
import com.adealink.weparty.room.applymic.data.ApplyMicData
import com.google.gson.annotations.GsonNullable
import com.google.gson.annotations.SerializedName


data class CheckCreateRoomPermissionRes(
    @SerializedName("homeowner") val isOwner: Boolean,
    @SerializedName("roomTitle") val roomTitle: String,
    @SerializedName("roomCover") val roomCover: String,
    @SerializedName("forbidAudio") val forbidAudio: Boolean,
    @GsonNullable
    @SerializedName("roomTypes") val roomTypes: List<Int>?
)

data class CreateRoomReq(
    @SerializedName("roomTitle") val roomTitle: String,
    @SerializedName("roomCover") val roomCover: String,
    @SerializedName("forbidAudio") val forbidAudio: Boolean
)

data class CreateRoomRes(
    @SerializedName("roomId") val roomId: String,
)

data class ApplyMicReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("index") val index: Int,
)

data class CancelApplyMicReq(
    @SerializedName("roomId") val roomId: String,
)

data class ApplyMicListReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("searchType") val searchType: Int,
    @GsonNullable
    @SerializedName("skillCategories") val skillCategories: List<String>?,

    @SerializedName("page") val page: PageReq,
)


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

data class ClearApplyMicListReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("searchType") val searchType: Int,
)

data class AcceptApplyMicReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("applyId") val applyId: String,
    @SerializedName("pass") val pass: Boolean,
)

data class UpdateRoomInfoReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("roomTitle") val roomTitle: String,
    @SerializedName("roomCover") val roomCover: String,
    @SerializedName("forbidAudio") val forbidAudio: Boolean,
)

data class InviteMicReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("userId") val userId: String,
    @SerializedName("micIndex") val micIndex: Int,
)

data class GetRoomMemberReq(
    @SerializedName("roomId") val roomId: String,
    @SerializedName("page") val page: PageReq,

    //过滤陪玩师
    @GsonNullable
    @SerializedName("playmete") val filterPlaymate: Boolean? = null,
    @GsonNullable
    @SerializedName("skillCategories") val skillCategories: List<String>? = null,
)

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

data class MemberUserData(
    @SerializedName("user") val user: UserInfo
)

data class RoomPlaymateCategoryReq(
    @SerializedName("roomId") val roomId: String,
)

data class RoomPlaymateCategoryRes(
    @SerializedName("list") val categorys: List<PlaymateCategoryData>,
)

data class ApplyMicPlaymateCategoryReq(
    @SerializedName("id") val roomId: String,
)

data class ApplyMicPlaymateCategoryRes(
    @SerializedName("list") val categorys: List<PlaymateCategoryData>,
)

data class ReportRoomAvailableReq(
    @SerializedName("id") val roomId: String,
    @SerializedName("supplier") val supplier: Int = SUPPLIER_TRTC_LIVE, //房间供应商
    @SerializedName("errorCode") val errorCode: String = "", //房间供应商
    @SerializedName("errorReson") val errorReason: String = "", //房间供应商
) {
    companion object {
        const val SUPPLIER_TRTC_LIVE = 1 //腾讯Live
    }
}