ICommentRepository.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Threading.Tasks;
  5. using GxPress.Common.Page;
  6. using GxPress.Entity;
  7. using GxPress.Request.Comment;
  8. using GxPress.Result.Comment;
  9. using Datory;
  10. namespace GxPress.Repository.Interface
  11. {
  12. public interface ICommentRepository : IRepository
  13. {
  14. /// <summary>
  15. /// 添加文章评论
  16. /// </summary>
  17. /// <param name="request"></param>
  18. /// <returns></returns>
  19. Task<int> CommentInAsync(CommentInRequest request);
  20. Task<PagedList<CommentPageResult>> GetPagedList(CommentSearchPageRequest request);
  21. Task<int> GetCountAsync(CommentSearchPageRequest request);
  22. Task<IEnumerable<CommentPageResult>> GetPageListAsync(CommentSearchPageRequest request);
  23. Task<List<CommentReplyResult>>
  24. GetCommentReplyResultByPid(int pid, List<CommentReplyResult> commentReplyResults);
  25. /// <summary>
  26. /// 删除评论
  27. /// </summary>
  28. /// <param name="request"></param>
  29. /// <returns></returns>
  30. Task<bool> DeleteCommentAsync(CommentDeleteRequest request);
  31. /// <summary>
  32. /// 获取文章的评论条数
  33. /// </summary>
  34. /// <param name="articleId"></param>
  35. /// <returns></returns>
  36. Task<int> GetCommentCountAsync(int articleId);
  37. Task<Comment> GetAsync(SqlKata.Query query);
  38. Task<bool> UpdateAsync(Comment comment);
  39. Task<int> CountAsync(SqlKata.Query query);
  40. }
  41. }