package com.wisewoods.eduandroid.ui.adapter;

import com.wisewoods.base.base.BaseAdapter;
import com.wisewoods.base.base.BaseVH;
import com.wisewoods.base.bean.RoomInfo;
import com.wisewoods.base.utils.$;
import com.wisewoods.eduandroid.R;

import org.jetbrains.annotations.NotNull;

public class RoomSubAdapter extends BaseAdapter<RoomInfo.ScheduleBean> {
    public RoomSubAdapter() {
        super(R.layout.item_recycler_room_sub);
    }

    @Override
    protected void convert(@NotNull BaseVH baseVH, RoomInfo.ScheduleBean scheduleBean) {
        String sTime = $.timeFormat3(scheduleBean.courseStart);
        String eTime = $.timeFormat3(scheduleBean.courseEnd);

        baseVH.setText(R.id.tv_name, scheduleBean.itemName)
                .setText(R.id.tv_class, scheduleBean.teamName + "/" + scheduleBean.groupNames)
                .setText(R.id.tv_time, sTime + "-" + eTime);
    }
}
