网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
namespace Dpz.Core.Service.RepositoryService
{
    /// <summary>
    /// 聊天记录
    /// </summary>
    public interface IChatRecordService
    {
        /// <summary>
        /// 保存好友聊天记录
        /// </summary>
        /// <param name="sender">发送人</param>
        /// <param name="message">消息</param>
        /// <param name="receiver">接收人</param>
        /// <returns></returns>
        Task SaveFriendRecordAsync(VmUserInfo sender, string message, VmUserInfo receiver);

        /// <summary>
        /// 保存群聊天记录
        /// </summary>
        /// <param name="sender">发送人</param>
        /// <param name="groupId">群组ID</param>
        /// <param name="message">消息</param>
        /// <returns></returns>
        Task SaveGroupRecordAsync(VmUserInfo sender, string groupId, string message);

        /// <summary>
        /// 保存与机器人的聊天记录
        /// </summary>
        /// <param name="sender">发送人</param>
        /// <param name="message">消息</param>
        /// <param name="receiveMessage">回复消息</param>
        /// <returns></returns>
        Task SaveRobotRecordAsync(VmUserInfo? sender, string message, string receiveMessage);

        /// <summary>
        /// 获取好友聊天记录
        /// </summary>
        /// <param name="sender">发送人</param>
        /// <param name="receiver">接收人</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页条数</param>
        /// <returns></returns>
        Task<IPagedList<VmChatRecord>>
            GetFriendRecordAsync(string sender, string receiver, int pageIndex, int pageSize);

        /// <summary>
        /// 获取机器人聊天记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<IPagedList<VmChatRecord>> GetRobotRecordAsync(string sender, int pageIndex, int pageSize);

        /// <summary>
        /// 获取群组聊天记录
        /// </summary>
        /// <param name="groupId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<IPagedList<VmChatRecord>> GetGroupRecordAsync(string groupId, int pageIndex, int pageSize);
    }
}
loading