package com.wisewoods.eduandroid.ui.adapter;

import com.wisewoods.base.base.BaseVH;
import com.wisewoods.base.bean.TeacherCourseList;
import com.wisewoods.base.page.BasePageAdapter;
import com.wisewoods.eduandroid.R;
import com.wisewoods.eduandroid.app.ImgManager;

import org.jetbrains.annotations.NotNull;

public class CourseAdapter extends BasePageAdapter<TeacherCourseList.DataBean> {
    public CourseAdapter() {
        super(R.layout.item_recycler_course);
    }


    @Override
    protected void convert(@NotNull BaseVH baseVH, TeacherCourseList.DataBean dataBean) {
        baseVH.setText(R.id.tv_name, dataBean.courseName)
                .setText(R.id.tv_des, dataBean.courseSynopsis)
                .setText(R.id.tv_status, ImgManager.getAudit(dataBean.auditStatus))
                .setTextColor(R.id.tv_status, ImgManager.getAuditColor(dataBean.auditStatus))
                .setNetUrl(R.id.iv_course_cover, dataBean.courseThumbnailUrl, R.drawable.shape_dialog_edit)
        ;

    }
}
