IMediaRepository.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using Datory;
  4. using GxPress.Common.Page;
  5. using GxPress.Request.Media;
  6. using GxPress.Result.Media;
  7. namespace GxPress.Repository.Interface.Media
  8. {
  9. public interface IMediaRepository : IRepository
  10. {
  11. Task<MediaResult> GetAsync(int id);
  12. Task<Entity.tede2.Media.Media> GetAsync(string autoNumber);
  13. /// <summary>
  14. /// 删除
  15. /// </summary>
  16. /// <param name="id"></param>
  17. /// <returns></returns>
  18. Task<bool> DeleteAsync(int id);
  19. /// <summary>
  20. /// 添加媒体
  21. /// </summary>
  22. /// <param name="result"></param>
  23. /// <returns></returns>
  24. Task<bool> InsertAsync(MediaResult result);
  25. Task<bool> UpdateAsync(MediaResult result);
  26. Task<bool> UpdateAsync(SqlKata.Query query);
  27. Task<PagedList<Entity.tede2.Media.Media>> GetAllAsync(MediaSearchRequest request);
  28. Task<int> CountAsync(string beginTime, string endTiem);
  29. Task<int> CountAsync(SqlKata.Query query);
  30. /// <summary>
  31. /// 获取书籍
  32. /// </summary>
  33. /// <param name="mediaId"></param>
  34. /// <returns></returns>
  35. Task<BookMediaResult> GetBookMediaResultAsync(int mediaId);
  36. /// <summary>
  37. /// 获取书籍
  38. /// </summary>
  39. /// <param name="mediaId"></param>
  40. /// <returns></returns>
  41. Task<VideoMediaResult> GetVideoMediaResultAsync(int mediaId);
  42. Task<IEnumerable<NavigationMediaResult>> GetNavigationMediaResults(IEnumerable<int> mediaLables);
  43. }
  44. }