package ink.wgink.module.sms.dao.email;

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.sms.pojo.dtos.email.EmailDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IEmailDao
 * @Description: 邮件
 * @Author: WangGeng
 * @Date: 2020/7/31 4:20 下午
 * @Version: 1.0
 **/
@Repository
public interface IEmailDao extends IInitBaseTable {

    /**
     * 保存Email
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

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

    /**
     * 更新邮件发送状态
     *
     * @param params
     * @throws UpdateException
     */
    void updateSendingStatus(Map<String, Object> params) throws UpdateException;

    /**
     * Email详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    EmailDTO get(Map<String, Object> params) throws SearchException;

    /**
     * Email列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<EmailDTO> list(Map<String, Object> params) throws SearchException;

}
