package com.erp.inventory.service;

import com.erp.inventory.entity.StockWarningRecord;
import com.erp.inventory.entity.StockWarningRule;

/**
 * 库存预警通知服务接口
 */
public interface StockWarningNotificationService {

    /**
     * 发送预警通知
     * @param record 预警记录
     * @param rule 预警规则
     * @return 是否发送成功
     */
    boolean sendNotification(StockWarningRecord record, StockWarningRule rule);

    /**
     * 发送系统通知
     */
    boolean sendSystemNotification(StockWarningRecord record, StockWarningRule rule);

    /**
     * 发送邮件通知
     */
    boolean sendEmailNotification(StockWarningRecord record, StockWarningRule rule);

    /**
     * 发送钉钉通知
     */
    boolean sendDingTalkNotification(StockWarningRecord record, StockWarningRule rule);

    /**
     * 测试钉钉Webhook
     */
    boolean testDingTalkWebhook(String webhookUrl, String secret);

    /**
     * 测试邮件发送
     */
    boolean testEmail(String toEmail, String subject, String content);
}
