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

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.category.CategoryDTO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IArticleCategoryDao
 * @Description: 文章类别
 * @Author: WenG
 * @Date: 2020-04-03 15:20
 * @Version: 1.0
 **/
@Repository
public interface ICategoryDao 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
     */
    CategoryDTO get(Map<String, Object> params) throws SearchException;

    /**
     * 文章类别列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<CategoryDTO> list(Map<String, Object> params) throws SearchException;

}
