package com.swago.baseswago.model.live.audio

import android.os.Parcel
import android.os.Parcelable

data class AudioSeatModel(
    val user_name:String?, //用户昵称
    val user_head_img_url: String?, //用户头像
    val user_id:String?, //用户ID
    val voice_status:Int, //麦位语音状态(1正常2禁言)
    var lock_status:Int, //锁麦状态(1正常2锁定)
    var voice_jifen:String?,//积分
    var voice_user_id:String?,//被谁给闭麦
    val maiIndex:Int,//积分
    var showVoice:Int //说话闪烁 1显示 0隐藏
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readString(),
        parcel.readString(),
        parcel.readInt(),
        parcel.readInt()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(user_name)
        parcel.writeString(user_head_img_url)
        parcel.writeString(user_id)
        parcel.writeInt(voice_status)
        parcel.writeInt(lock_status)
        parcel.writeString(voice_jifen)
        parcel.writeString(voice_user_id)
        parcel.writeInt(maiIndex)
        parcel.writeInt(showVoice)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<AudioSeatModel> {
        override fun createFromParcel(parcel: Parcel): AudioSeatModel {
            return AudioSeatModel(parcel)
        }

        override fun newArray(size: Int): Array<AudioSeatModel?> {
            return arrayOfNulls(size)
        }
    }
}

data class AudioSeatList(
    val list:List<AudioSeatModel>?
)
