IResourceFileService.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 资源文件管理服务
  5. /// </summary>
  6. public interface IResourceFileService
  7. {
  8. /// <summary>
  9. /// 上传文件
  10. /// </summary>
  11. /// <param name="input"></param>
  12. /// <returns></returns>
  13. Task<ResourceFileOutput> Upload([FromForm] UploadResourceFileInput input);
  14. /// <summary>
  15. /// 添加资源文件
  16. /// </summary>
  17. /// <param name="input"></param>
  18. /// <param name="thumbInput">缩略图</param>
  19. /// <returns></returns>
  20. Task<ResourceFileOutput> Add(AddResourceFileInput input, AddResourceFileInput thumbInput = null);
  21. /// <summary>
  22. /// 删除资源文件
  23. /// </summary>
  24. /// <param name="input"></param>
  25. /// <returns></returns>
  26. Task Del(BaseId<long> input);
  27. /// <summary>
  28. /// 根据ID获取资源详细
  29. /// </summary>
  30. /// <param name="id"></param>
  31. /// <returns></returns>
  32. Task<ResourceFileOutput> GetById(long id);
  33. /// <summary>
  34. /// 根据类型和源ID获取资源列表
  35. /// </summary>
  36. /// <param name="type"></param>
  37. /// <param name="sourceId"></param>
  38. /// <returns></returns>
  39. Task<List<ResourceFileOutput>> GetListBySourceId(ResourceFileType type, long sourceId);
  40. }