using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Datory;
using GxPress.Common.Page;
using GxPress.Entity.Topic;
using GxPress.Request.App.Topic;
using GxPress.Result.App.Topic;

namespace GxPress.Repository.Interface.Topic
{
    public interface ITopicGroupUserRepository : IRepository
    {
        Task<TopicGroupUser> GetAsync(int id);

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

        Task<bool> InsertAsync(TopicGroupUser topicGroupUser);

        Task<PagedList<TopicGroupUserResult>> GetTopicGroupUserById(int topicGroupId);

        /// <summary>
        /// 根据GroupId删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<bool> DeleteGroupIdAsync(List<int> ids);


        /// <summary>
        /// 根据分组ID和姓名查询用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PagedList<TopicGroupUserResult>> SearchTopicGroupUsersAsync(SearchTopicGroupUsersRequest request);

        Task<IEnumerable<TopicGroupUser>> GetAllAsync(SqlKata.Query query);

        Task<int> CountAsync(SqlKata.Query query);

        Task<bool> UpdateAsync(SqlKata.Query query);
    }
}
