using Hotline.Share.Dtos.Caselibrary;

namespace Hotline.Application.Caselibrary
{
    public interface ICaseApplication
    {

        #region 案例库类型管理

        /// <summary>
        ///案例库类型 - 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<string> AddTypeAsync(AddCaseTypeDto dto, CancellationToken cancellationToken);

        /// <summary>
        ///案例库类型 - 编辑
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task UpdateTypeAsync(UpdateCaseTypeDto dto, CancellationToken cancellationToken);

        /// <summary>
        /// 案例库类型 - 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task RemoveTypeAsync(string Id, CancellationToken cancellationToken);

        #endregion

        #region 案例库管理

        /// <summary>
        /// 案例库 - 列表
        /// </summary>
        /// <param name="pagedDto"></param>
        /// <returns></returns>
        Task<(int, IList<CaseDataDto>)> QueryAllCaseListAsync(CaseListDto pagedDto, CancellationToken cancellationToken);

        /// <summary>
        /// 案例库 - 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<string> AddCaseAsync(AddCaseListDto dto, CancellationToken cancellationToken);

        /// <summary>
        ///案例库类型 - 编辑
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task UpdateCaseAsync(UpdateCaseListDto dto, CancellationToken cancellationToken);

        /// <summary>
        ///案例库类型 - 删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task RemoveCaseAsync(UpdateCaseListDto dto, CancellationToken cancellationToken);

        /// <summary>
        ///案例库类型 - 下架审核
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task AuditCaseAsync(UpdateCaseListDto dto, CancellationToken cancellationToken);

        /// <summary>
        ///案例库类型 - 详情
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="IsAddPv">默认不增加，false不增加，true增加浏览量</param>
        /// <returns></returns>
        Task<CaseInfoDto> GetCaseAsync(string Id, bool? IsAddPv, CancellationToken cancellationToken);

        /// <summary>
        /// 案例库类型 - 批量导出
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<Dictionary<string, Stream>> CaseInfoListExportAsync(CaseInfoExportDto dto, CancellationToken cancellationToken);

        #endregion

    }
}
