IMediaRepository.cs 1.4 KB

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