package ink.wgink.module.article.dao.content;

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.article.pojo.dtos.content.ContentDTO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IArticleContentDao
 * @Description: 文章内容
 * @Author: WenG
 * @Date: 2020-04-03 15:37
 * @Version: 1.0
 **/
@Repository
public interface IContentDao 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 UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * 文章内容详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ContentDTO get(Map<String, Object> params) throws SearchException;

    /**
     * 文章内容列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ContentDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 统计文章数量
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

}
