package com.m2pool.auth.service;

import com.m2pool.auth.entity.GetEmailCodeEntity;
import com.m2pool.auth.entity.GetLoginEmailCodeEntity;
import com.m2pool.common.core.Result.R;
import com.m2pool.system.api.entity.EmailTemplateEntity;

/**
 * @Description TODO
 * @Date 2024/6/11 14:56
 * @Author dy
 */
public interface MailService {
    /**
     * 发送纯文本邮件
     * @param to
     * @param subject
     * @param text
     */
    public void sendTextMailMessage(String to,String subject,String text);

    /**
     * 发送矿机离线数 html邮件
     */
    public void sendHtmlMailMessage(EmailTemplateEntity entity);

    /**
     * 发送带附件的邮件
     * @param to      邮件收信人
     * @param subject 邮件主题
     * @param content 邮件内容
     * @param filePath 附件路径
     */
    public void sendAttachmentMailMessage(String to,String subject,String content,String filePath);

    /**
     * 发送注册邮箱验证码
     * @param to
     * @param code
     */
    public void sendCodeMailMessage(String to, String code);

    /**
     * 发送登录邮箱验证码
     * @param to
     * @param code
     */
    public void sendLoginCodeMailMessage(String to, String code);

    /**
     * 发送重置密码邮箱验证码
     * @param to
     * @param code
     */
    public void sendResetPwdMailMessage(String to, String code);

    /**
     * 发送修改密码邮箱验证码
     * @param to
     * @param code
     */
    public void sendUpdatePwdMailMessage(String to, String code);



    public R<?> emailCode(GetEmailCodeEntity entity);

    public R<?> loginCode(GetLoginEmailCodeEntity entity);

    public R<?> AddCreditCode(GetEmailCodeEntity entity);

    public R<?> resetPwdCode(GetEmailCodeEntity entity);

    public R<?> updatePwdCode();

}
