ICollectionRepository.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Threading.Tasks;
  5. using Datory;
  6. using GxPress.Common.Page;
  7. using GxPress.Request.App.Collection;
  8. using GxPress.Result.App.Collection;
  9. namespace GxPress.Repository.Interface.Collection
  10. {
  11. public interface ICollectionRepository : IRepository
  12. {
  13. /// <summary>
  14. /// 添加收藏
  15. /// </summary>
  16. /// <param name="collection"></param>
  17. /// <returns></returns>
  18. Task<int> InsertAsync(Entity.Collection collection);
  19. /// <summary>
  20. /// 查询结果
  21. /// </summary>
  22. /// <param name="request"></param>
  23. /// <returns></returns>
  24. Task<PagedList<CollectionListPageResult>> PageListAsync(CollectionPageSearchRequest request);
  25. /// <summary>
  26. /// 根据ID获取收藏数据
  27. /// </summary>
  28. /// <param name="id"></param>
  29. /// <returns></returns>
  30. Task<Entity.Collection> GetAsync(int id);
  31. Task<Entity.Collection> GetAsync(SqlKata.Query query);
  32. Task<bool> DeleteAsync(SqlKata.Query query);
  33. Task<bool> DeleteAsync(int id);
  34. Task<IEnumerable<Entity.Collection>> GetAllAsync(SqlKata.Query query);
  35. /// <summary>
  36. /// 递归删除收藏包括文件夹下面的数据
  37. /// </summary>
  38. /// <param name="middleIds"></param>
  39. /// <returns></returns>
  40. Task<bool> RecursionDeleteAsync(List<int> middleIds);
  41. /// <summary>
  42. /// 收藏无文件夹分页列表
  43. /// </summary>
  44. /// <param name="request"></param>
  45. /// <returns></returns>
  46. Task<PagedList<CollectionNoFolderResult>> GetCollectionNoFolderPageListAsync(CollectionPageSearchRequest request);
  47. /// <summary>
  48. /// 设置收藏置顶
  49. /// </summary>
  50. /// <param name="collection"></param>
  51. /// <returns></returns>
  52. Task<bool> SetTopAsync(int id);
  53. }
  54. }