package com.cm.common.plugin.dao.dynamic.config;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.plugin.pojo.dtos.dynamic.config.DynamicConfigTableDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IDynamicConfigTableDao
 * @Description: 动态配置-表
 * @Author: WangGeng
 * @Date: 2019/12/7 6:13 下午
 * @Version: 1.0
 **/
@Repository
public interface IDynamicConfigTableDao {

    /**
     * 表新增
     *
     * @param params
     * @throws SearchException
     */
    void saveTable(Map<String, Object> params) throws SearchException;

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

    /**
     * 表修改
     *
     * @param params
     * @throws UpdateException
     */
    void updateTable(Map<String, Object> params) throws UpdateException;

    /**
     * 表详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    DynamicConfigTableDTO getTableById(Map<String, Object> params) throws SearchException;

    /**
     * 表全部列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<DynamicConfigTableDTO> listTable(Map<String, Object> params) throws SearchException;
}
