package top.continew.admin.business.service;

import top.continew.admin.business.model.entity.HomeworkDO;
import top.continew.admin.business.model.query.HomeworkQuery;
import top.continew.admin.business.model.req.HomeworkAddReq;
import top.continew.admin.business.model.req.HomeworkEditReq;
import top.continew.admin.business.model.resp.HomeworkResp;
import top.continew.starter.data.mp.service.IService;
import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.resp.PageResp;
import java.util.List;

/**
 * 作业业务接口
 *
 * @author jiay
 * @since 2025/06/26 10:24
 */
public interface HomeworkService extends IService<HomeworkDO> {

    /**
     * 获取作业列表
     *
     * @param query 作业查询条件
     * @return 作业列表
     */
    List<HomeworkResp> getHomeworkList(HomeworkQuery query);

    /**
     * 添加作业
     *
     * @param req 作业
     * @return url
     */
    boolean addHomework(HomeworkAddReq req);

    /**
     * 添加作业
     *
     * @param req 作业
     * @return 添加是否成功
     */
    boolean editHomework(HomeworkEditReq req);

    /**
     * 添加作业
     *
     * @param id 作业id
     * @return 添加是否成功
     */
    boolean deleteHomework(Long id);

    /**
     * 添加作业
     *
     * @param id 作业id
     * @return 作业
     */
    HomeworkResp getHomework(Long id);

    /**
     * 添加作业
     *
     * @param query     作业查询条件
     * @param pageQuery 分页参数
     * @return 作业分页列表
     */
    PageResp<HomeworkResp> getHomeworkPage(HomeworkQuery query, PageQuery pageQuery);
}