package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
import com.ym.mec.biz.dal.enums.AuditStatusEnum;
import com.ym.mec.common.service.BaseService;

import java.util.List;

public interface TeacherLeaveRecordService extends BaseService<Long, TeacherLeaveRecord> {

	/**
	 * 请假
	 * @param teacherLeaveRecord
	 * @return
	 */
	boolean askForLeave(TeacherLeaveRecord teacherLeaveRecord);

	/**
	 * 审批
	 * @param id 记录编号
	 * @param userId 审批人编号
	 * @param status 审批状态
	 * @param remark 备注
	 * @return
	 */
	boolean approve(Long id, Integer userId, AuditStatusEnum status, String remark);

	/**
	 * @describe 检测课程安排是否与老师的请假时间存在冲突
	 * @author Joburgess
	 * @date 2019/10/29
	 * @param courseSchedules: 课程计划
	 * @return void
	 */
	void checkCourseSchedulePlansExitLeaveRecord(List<CourseSchedule> courseSchedules);


}
