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

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 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 IPaperDao 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
     * @throws UpdateException
     */
    void updatePaperStatus(Map<String, Object> params) throws UpdateException;

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

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

    /**
     * 总数
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;
}
