using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using GxPress.Entity;
using GxPress.Request.App.GroupFolder;
using GxPress.Request.App.GroupUser;
using Datory;
using GxPress.EnumConst;

namespace GxPress.Repository.Interface
{
    public interface IGroupUserRepository : IRepository
    {



        Task<bool> UpdateAsync(GroupUserUpRequest request);

        Task<bool> DeleteAsync(SqlKata.Query query);

        Task<IEnumerable<GroupUser>> FindGroupUserAsync(GroupUserFindRequest request);

        Task<int> InsertAsync(int userId, int groupId, GroupUserRoleTyeConst groupUserRoleId);


        Task<GroupUser> GetAsync(SqlKata.Query q);
        Task<IEnumerable<GroupUser>> GetAllAsync(SqlKata.Query q);

        Task<int> InsertAsync(GroupUser groupUser);

        /// <summary>
        /// 设置用户是否免打扰
        /// </summary>
        /// <param name="groupId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<bool> SetIsUDisturbAsync(int groupId, int userId);
        Task<bool> InsertAsync(List<GroupUser> groupUsers);
    }
}
