using System.Threading.Tasks;
namespace LiveForum.IService.Messages
{
///
/// 消息发布器接口
/// 轻量级门面,只负责发布事件到队列,不查询数据库
///
public interface IMessagePublisher
{
///
/// 发送系统消息(直接写入数据库,不走队列)
///
/// 接收者用户ID
/// 消息标题
/// 消息内容
///
Task SendSystemMessageAsync(long receiverId, string title, string content);
///
/// 发送回复消息(完整版)
///
/// 触发者用户ID
/// 接收者用户ID
/// 评论ID
/// 评论内容
/// 帖子ID
/// 帖子标题
/// 父评论ID(如果是回复评论)
/// 我的评论内容(被回复的内容)
///
Task SendReplyMessageAsync(
long triggerId,
long receiverId,
long commentId,
string commentContent,
long postId,
string postTitle,
long? parentCommentId = null,
string myCommentContent = null);
///
/// 发送回复消息(简化版)
///
/// 触发者用户ID
/// 接收者用户ID
/// 消息标题
/// 消息内容
/// 我的评论内容(可选)
///
Task SendReplyMessageSimpleAsync(
long triggerId,
long receiverId,
string title,
string content,
string myCommentContent = null);
///
/// 发送点赞消息(完整版)
///
/// 触发者用户ID
/// 接收者用户ID
/// 内容类型:1-帖子,2-评论,3-送花
/// 内容ID
/// 帖子标题(可选)
/// 评论内容(可选)
///
Task SendLikeMessageAsync(
long triggerId,
long receiverId,
byte contentType,
long contentId,
string postTitle = null,
string commentContent = null);
///
/// 发送点赞消息(简化版)
///
/// 触发者用户ID
/// 接收者用户ID
/// 消息标题
/// 消息内容
///
Task SendLikeMessageSimpleAsync(
long triggerId,
long receiverId,
string title,
string content);
}
}