package com.lesingle.edu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lesingle.edu.dto.request.SchedulePlanCreateRequest;
import com.lesingle.edu.dto.request.SchedulePlanUpdateRequest;
import com.lesingle.edu.dto.response.TimetableResponse;
import com.lesingle.edu.entity.SchedulePlan;

import java.time.LocalDate;
import java.util.List;

/**
 * 教师端排课服务接口
 */
public interface TeacherScheduleService extends com.baomidou.mybatisplus.extension.service.IService<SchedulePlan> {

    /**
     * 获取教师排课列表
     */
    Page<SchedulePlan> getTeacherSchedules(Long teacherId, Integer pageNum, Integer pageSize,
                                           LocalDate startDate, LocalDate endDate);

    /**
     * 获取教师课表（按日期分组）
     */
    List<TimetableResponse> getTimetable(Long teacherId, LocalDate startDate, LocalDate endDate);

    /**
     * 获取今日排课
     */
    List<SchedulePlan> getTodaySchedules(Long teacherId);

    /**
     * 创建排课
     */
    SchedulePlan createSchedule(Long tenantId, Long teacherId, SchedulePlanCreateRequest request);

    /**
     * 更新排课
     */
    SchedulePlan updateSchedule(Long scheduleId, SchedulePlanUpdateRequest request);

    /**
     * 取消排课
     */
    void cancelSchedule(Long scheduleId);

    /**
     * 根据 ID 获取排课
     */
    SchedulePlan getScheduleById(Long scheduleId);
}
