using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 资源文件管理服务
/// </summary>
public interface IResourceFileService
{
    /// <summary>
    /// 上传文件
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<ResourceFileOutput> Upload([FromForm] UploadResourceFileInput input);
    /// <summary>
    /// 添加资源文件
    /// </summary>
    /// <param name="input"></param>
    /// <param name="thumbInput">缩略图</param>
    /// <returns></returns>
    Task<ResourceFileOutput> Add(AddResourceFileInput input, AddResourceFileInput thumbInput = null);
    /// <summary>
    /// 删除资源文件
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task Del(BaseId<long> input);
    /// <summary>
    /// 根据ID获取资源详细
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<ResourceFileOutput> GetById(long id);
    /// <summary>
    /// 根据类型和源ID获取资源列表
    /// </summary>
    /// <param name="type"></param>
    /// <param name="sourceId"></param>
    /// <returns></returns>
    Task<List<ResourceFileOutput>> GetListBySourceId(ResourceFileType type, long sourceId);
}
