package ink.wgink.module.examine.dao.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.question.QuestionDTO;
import ink.wgink.module.examine.pojo.pos.question.QuestionPO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IQuestionDao
 * @Description: 试题管理
 * @Author: WenG
 * @Date: 2020-09-09 21:00
 * @Version: 1.0
 **/
@Repository
public interface IQuestionDao extends IInitBaseTable {

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

    /**
     * 删除试题管理
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 删除试题管理（物理）
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 修改试题管理
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * 试题管理详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    QuestionDTO get(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    QuestionPO getPO(Map<String, Object> params) throws SearchException;

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

    /**
     * 试题管理统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

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

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

}