package ink.wgink.module.examine.dao.paper.question;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.examine.pojo.dtos.paper.PaperDTO;
import ink.wgink.module.examine.pojo.dtos.paper.question.PaperQuestionDTO;
import ink.wgink.module.examine.pojo.dtos.question.QuestionDTO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Description: 试卷试题
 * @Author: WenG
 * @Date: 2022/5/16 20:45
 * @Version: 1.0
 **/
@Repository
public interface IPaperQuestionDao extends IInitBaseTable {

    /**
     * 新增
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 修改试题排序
     *
     * @param params
     * @throws UpdateException
     */
    void updateQuestionSort(Map<String, Object> params) throws UpdateException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<PaperDTO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<PaperQuestionDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 试题列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<QuestionDTO> listQuestion(Map<String, Object> params) throws SearchException;

    /**
     * ID列表
     *
     * @param params
     * @return
     */
    List<String> listId(Map<String, Object> params);
}
