package com.bbitcn.silk.adapter;

import com.bbitcn.silk.base.BaseRecyclerAdapter;
import com.bbitcn.silk.databinding.ItemPriceBinding;
import com.bbitcn.silk.model.net.TodayPrice;

import java.util.List;

/**
 * @Description TODO
 * @Author DuanKaiji
 * @CreateTime 2024年04月01日 11:00:15
 */
public class PriceAdapter extends BaseRecyclerAdapter<TodayPrice.DataDTO.ItemsDTO, ItemPriceBinding> {
    public PriceAdapter(List<TodayPrice.DataDTO.ItemsDTO> dataList, Class<ItemPriceBinding> bindingClass) {
        super(dataList, bindingClass);
    }

    @Override
    protected void bindData(ItemPriceBinding binding, TodayPrice.DataDTO.ItemsDTO data) {
        binding.tvType.setText(data.getName());
        binding.tvPrice.setText(data.getMinprice() + " ~ " + data.getMaxprice());
    }

}
