INoteRepository.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.Note;
  8. using GxPress.Request.Web;
  9. using GxPress.Result.App.Note;
  10. using GxPress.Result.Web;
  11. namespace GxPress.Repository.Interface.Note
  12. {
  13. public interface INoteRepository : IRepository
  14. {
  15. /// <summary>
  16. /// 获取笔记
  17. /// </summary>
  18. /// <param name="id"></param>
  19. /// <returns></returns>
  20. Task<Entity.Note.Note> GetAsync(int id);
  21. /// <summary>
  22. /// 添加笔记
  23. /// </summary>
  24. /// <param name="note"></param>
  25. /// <returns></returns>
  26. Task<int> InsertAsync(Entity.Note.Note note);
  27. /// <summary>
  28. /// 修改笔记
  29. /// </summary>
  30. /// <param name="note"></param>
  31. /// <returns></returns>
  32. Task<bool> UpdateAsync(Entity.Note.Note note);
  33. /// <summary>
  34. /// 获取笔记分页
  35. /// </summary>
  36. /// <param name="request"></param>
  37. /// <returns></returns>
  38. Task<PagedList<NotePageListRequest>> NotePageListAsync(NoteSearchPageListRequest request);
  39. Task<bool> DeleteAsync(SqlKata.Query query);
  40. Task<bool> DeleteAsync(int id);
  41. Task<bool> UpdateAsync(SqlKata.Query query);
  42. /// <summary>
  43. ///查询个人摘录
  44. /// </summary>
  45. /// <param name="request"></param>
  46. /// <returns></returns>
  47. Task<PagedList<NoteUserExtractResult>> GetAllByUserId(NoteUserRequest request);
  48. /// <summary>
  49. /// web页面查询话题
  50. /// </summary>
  51. /// <param name="request"></param>
  52. /// <returns></returns>
  53. Task<PagedList<NoteTopicResult>> GetTopicNoteAsync(NoteSearchPageListRequest request);
  54. /// <summary>
  55. /// 笔记没有文件夹分页
  56. /// </summary>
  57. /// <param name="request"></param>
  58. /// <returns></returns>
  59. Task<PagedList<NoteNotFolderPageResult>> GetNoteNotFolderPageResult(NoteSearchPageListRequest request);
  60. /// <summary>
  61. /// 设置置顶
  62. /// </summary>
  63. /// <param name="noteId"></param>
  64. /// <returns></returns>
  65. Task<bool> SetIsTopAsync(int noteId);
  66. /// <summary>
  67. /// 获取用户最近使用的文件夹
  68. /// </summary>
  69. /// <param name="userId"></param>
  70. /// <returns></returns>
  71. Task<IEnumerable<int>> GetLatelyFolderIdAsync(int userId);
  72. }
  73. }