package com.zswc.creativity.adapter

import coil.load
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.zswc.creativity.R
import com.ysnows.base.base.BAdapter
import com.zswc.creativity.databinding.ItemMyBoxBinding
import com.zswc.creativity.model.MyCollection

class CollectAdapter() : BAdapter<MyCollection,
        BaseDataBindingHolder<ItemMyBoxBinding>>(R.layout.item_my_box) {


    //state 1:进行中2：即将开售3：已售罄）
    override fun convert(holder: BaseDataBindingHolder<ItemMyBoxBinding>, item: MyCollection) {
        holder.dataBinding?.item = item

        holder.dataBinding?.imgBg?.load(item.cover){
            size(100,100)
            placeholder(R.drawable.bg_need_error)
            error(R.drawable.bg_need_error)
        }


    }


}
