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

namespace GxPress.Repository.Interface.Collection
{
    public interface ICollectionRepository : IRepository
    {
        /// <summary>
        /// 添加收藏
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        Task<int> InsertAsync(Entity.Collection collection);

        /// <summary>
        /// 查询结果
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PagedList<CollectionListPageResult>> PageListAsync(CollectionPageSearchRequest request);

        /// <summary>
        /// 根据ID获取收藏数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Entity.Collection> GetAsync(int id);

        Task<Entity.Collection> GetAsync(SqlKata.Query query);

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

        Task<bool> DeleteAsync(int id);
        
        Task<IEnumerable<Entity.Collection>> GetAllAsync(SqlKata.Query query);
         /// <summary>
        /// 递归删除收藏包括文件夹下面的数据
        /// </summary>
        /// <param name="middleIds"></param>
        /// <returns></returns>
         Task<bool> RecursionDeleteAsync(List<int> middleIds);
    }

}
