package rd.dao.mapper.course;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import rd.data.db.CourseScheduleWithCourseIdName;
import rd.data.db.CourseScheduleSelectionInfo;
import rd.data.db.table.CourseSchedule;
import rd.data.db.table.CourseSelection;
import rd.data.db.table.StudentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseSelectionMapper extends BaseMapper<CourseSelection> {
    List<CourseScheduleWithCourseIdName> getStudentSelectedSchedulesDetail(
            @Param("student") Long student,
            @Param("term") String term
    );

    List<CourseSchedule> getStudentSelectedSchedules(@Param("student") Long student, @Param("term") String term);

    Integer isStudentSelected(@Param("student") Long student,
                              @Param("term") String term,
                              @Param("course") Long course
    );

    List<CourseScheduleSelectionInfo> getSelectedStudentList(@Param("course") Long course,
                                                             @Param("term") String term
    );

    List<StudentInfo> getNotSelectStudentList(@Param("course") Long course,
                                              @Param("term") String term
    );
}
