package ink.wgink.login.base.dao.login;

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.login.base.pojo.dtos.login.LoginFormDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ILoginFormDao
 * @Description: 登录form表单
 * @Author: wanggeng
 * @Date: 2021/2/28 10:50 上午
 * @Version: 1.0
 */
@Repository
public interface ILoginFormDao extends IInitBaseTable {

    /**
     * 保存登录form表单
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除登录form表单
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 更新登录form表单
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * 修改激活状态
     *
     * @param params
     * @throws UpdateException
     */
    void updateActive(Map<String, Object> params) throws UpdateException;

    /**
     * 登录form表单列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<LoginFormDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 登录form表单详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    LoginFormDTO get(Map<String, Object> params) throws SearchException;

}
