using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using GxPress.Entity;
using GxPress.Request.GroupChat;
using GxPress.Request.GroupChatUser;
using GxPress.Result.GroupChatUser;
using Datory;

namespace GxPress.Repository.Interface
{
   public interface IGroupChatUserRepository:IRepository
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> InsertAsync(GroupChatUserInRequest request);
        Task<int> InsertAsync(Entity.GroupChatUser groupChatUser);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(GroupChatUserUpRequest request);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(int id);
        /// <summary>
        /// 根据群ID查询群
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<GroupChatUserByGroupChatIdResult>> GetGroupChatUserByGroupChatIdAsync(GroupChatUserSearchRequest request);
        /// <summary>
        /// 是否免打扰
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> UpIsDisturbAsync(GroupChatUserIsDisturbRequest request);
        /// <summary>
        /// 是否置顶
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> UpIsTopAsync(GroupChatUserIsTopRequest request);

        Task<GroupChatUser> FindGroupChatUserByIdAsync(int id);

        /// <summary>
        /// 根据群IMID获取用户
        /// </summary>
        /// <param name="imId"></param>
        /// <returns></returns>
        Task<IEnumerable<GroupChatUser>> FindGroupChatUserByImId(string imId);

        Task<bool> IsDisturbAsync(GroupChatUserIsDisturbRequest request);

        Task<IEnumerable<GroupChatUser>> GetAllAsync(SqlKata.Query query);
           /// <summary>
        /// 添加多个
        /// </summary>
        /// <param name="groupChatUsers"></param>
        /// <returns></returns>
        Task<bool> InsertAsync(List<GroupChatUser> groupChatUsers);
    }
}
