package ink.wgink.common.dao.env;

import ink.wgink.common.pojo.dtos.env.EnvDTO;
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 org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IEnvDao
 * @Description: 环境变量
 * @Author: wanggeng
 * @Date: 2022/5/16 10:24
 * @Version: 1.0
 */
@Repository
public interface IEnvDao extends IInitBaseTable {

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

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

    /**
     * 删除
     *
     * @throws RemoveException
     */
    void delete() throws RemoveException;

    /**
     * 列表
     *
     * @return
     * @throws SearchException
     */
    List<EnvDTO> list() throws SearchException;

    /**
     * 详情
     *
     * @param envKey
     * @return
     * @throws SearchException
     */
    EnvDTO get(String envKey) throws SearchException;

}
