using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Dto.Banner;
using QYZH.InteractiveMagazine.Models.Entity;
using QYZH.InteractiveMagazine.Models.Enum;

namespace QYZH.InteractiveMagazine.IService;

/// <summary>
/// 轮播图服务接口
/// </summary>
public interface IBannerService : IBaseService<Banner>
{
    /// <summary>
    /// 创建轮播图
    /// </summary>
    /// <param name="input">轮播图信息</param>
    /// <returns>创建后的轮播图信息</returns>
    Task<BannerOutput> CreateAsync(BannerInput input);

    /// <summary>
    /// 更新轮播图
    /// </summary>
    /// <param name="id">轮播图ID</param>
    /// <param name="input">轮播图信息</param>
    /// <returns>更新后的轮播图信息</returns>
    Task<BannerOutput> UpdateAsync(long id, BannerInput input);

    /// <summary>
    /// 删除轮播图
    /// </summary>
    /// <param name="id">轮播图ID</param>
    Task DeleteAsync(long id);

    /// <summary>
    /// 根据ID获取轮播图
    /// </summary>
    /// <param name="id">轮播图ID</param>
    /// <returns>轮播图信息</returns>
    Task<BannerOutput> GetByIdAsync(long id);

    /// <summary>
    /// 分页查询轮播图列表
    /// </summary>
    /// <param name="input">查询条件</param>
    /// <returns>分页结果</returns>
    Task<PageListModel<BannerOutput>> GetListAsync(BannerQueryInput input);

    /// <summary>
    /// 更新轮播图启用/禁用状态
    /// </summary>
    /// <param name="id">轮播图ID</param>
    /// <returns>操作结果</returns>
    Task<bool> UpdateStatusAsync(long id);

    /// <summary>
    /// 获取启用轮播图列表
    /// </summary>
    /// <param name="position">展示位置</param>
    /// <returns>轮播图列表</returns>
    Task<List<BannerOutput>> GetEnabledListAsync(BannerPositionEnum position);
}
