package com.lesingle.edu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lesingle.edu.entity.Notification;

/**
 * 通知服务接口
 */
public interface NotificationService extends com.baomidou.mybatisplus.extension.service.IService<Notification> {

    Notification createNotification(Long tenantId, Long senderId, String senderRole, String title, String content,
                                     String type, String recipientType, Long recipientId);

    Notification getNotificationById(Long id);

    Page<Notification> getNotificationPage(Long tenantId, Integer pageNum, Integer pageSize, String type, Integer isRead);

    Page<Notification> getMyNotifications(Long recipientId, String recipientType, Integer pageNum, Integer pageSize, Integer isRead);

    /**
     * 获取我的通知（支持按类型筛选）
     * @param notificationType 可选，通知类型筛选
     */
    Page<Notification> getMyNotifications(Long recipientId, String recipientType, Integer pageNum, Integer pageSize, Integer isRead, String notificationType);

    void markAsRead(Long id);

    void markAllAsRead(Long recipientId, String recipientType);

    void deleteNotification(Long id);

    Long getUnreadCount(Long recipientId, String recipientType);

}
