package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dto.CourseHomeworkReviewDto;
import com.yonge.cooleshow.biz.dal.dto.CourseHomeworkSaveDto;
import com.yonge.cooleshow.biz.dal.dto.CourseHomeworkSubmitDto;
import com.yonge.cooleshow.biz.dal.dto.CourseScheduleHomeworkSearch;
import com.yonge.cooleshow.biz.dal.dto.search.HomeworkAdminSearch;
import com.yonge.cooleshow.biz.dal.dto.search.HomeworkSearch;
import com.yonge.cooleshow.biz.dal.entity.CourseHomework;
import com.yonge.cooleshow.biz.dal.vo.CourseHomeworkDetailVo;
import com.yonge.cooleshow.biz.dal.vo.CourseHomeworkVo;
import com.yonge.cooleshow.biz.dal.vo.CourseScheduleHomeworkVo;

/**
 * 课程作业表 服务类
 * @author liweifan
 * @date 2022-03-30
 */
public interface CourseHomeworkService extends IService<CourseHomework>  {

	/**
     * 查询详情
     * @author liweifan
 	 * @date 2022-03-30
     */
	CourseHomeworkVo detail(Long id);

    /**
     * 分页查询
     */
    IPage<CourseHomeworkVo> selectPage(IPage<CourseHomeworkVo> page, HomeworkSearch query);

	/**
	 * 课程详情 课后作业信息
	 *
	 * @param courseId 课程id
	 * @param studentId
	 * @return 课后作业信息
	 */
	CourseHomeworkDetailVo getCourseHomeworkDetailByCourseId(Long courseId, Long studentId);

	/**
	 * 老师布置作业
	 *
	 * @param saveDto 作业信息
	 * @return boolean
	 */
    boolean decorateCourseHomework(CourseHomeworkSaveDto saveDto);

	/**
	 * 老师点评学生课后作业
	 *
	 * @param reviewDto 点评信息
	 * @return boolean
	 */
    boolean reviewCourseHomework(CourseHomeworkReviewDto reviewDto);

	/**
	 * 学生提交课程作业
	 *
	 * @param submitDto 学生提交信息
	 * @return boolean
	 */
	boolean submitCourseHomework(CourseHomeworkSubmitDto submitDto);

	/**
	 * 分页查询
	 *
	 * @param page 分页信息
	 * @param query 查询
	 * @return
	 */
	IPage<CourseHomeworkVo>  selectAdminPage(IPage<CourseHomeworkVo> page, HomeworkAdminSearch query);


	/**
	 * 琴房课-课后作业信息
	 *
	 * @param query 课程id
	 * @return
	 */
	CourseScheduleHomeworkVo getCourseHomeworkDetailByCourseId(CourseScheduleHomeworkSearch query);
}