package com.swago.user.roommanager

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.swago.baseswago.model.ListBean
import com.swago.loadUrl
import com.swago.user.R
import de.hdodenhof.circleimageview.CircleImageView

class RoomManagerAdapter : BaseQuickAdapter<ListBean, BaseViewHolder>(R.layout.item_room_manager, arrayListOf()) {

    override fun convert(helper: BaseViewHolder?, item: ListBean?) {
        helper?.apply {
            item?.let {
                setText(R.id.tvName,it.admin_user_name)
                setText(R.id.tvCreateTime,it.created_at)
                itemView.findViewById<CircleImageView>(R.id.ivAvatar).loadUrl(mContext,it.admin_user_head_img_url)
                addOnClickListener(R.id.tvDelete)
            }
        }
    }
}