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

namespace QYZH.InteractiveMagazine.IService;

/// <summary>
/// 社区消息后台管理服务接口
/// </summary>
public interface ICommunityMessageService : IBaseService<CommunityMessage>
{
    /// <summary>
    /// 分页查询消息列表
    /// </summary>
    Task<PageListModel<AdminMessageDetailOutput>> GetListAsync(AdminMessageQueryInput input);

    /// <summary>
    /// 查看消息详情
    /// </summary>
    Task<AdminMessageDetailOutput> GetDetailAsync(long id);

    /// <summary>
    /// 软删除消息
    /// </summary>
    Task DeleteAsync(long id);

    /// <summary>
    /// 冻结/解冻消息
    /// </summary>
    /// <param name="id">消息ID</param>
    /// <param name="status">状态: 1=解冻(通过), 2=冻结</param>
    Task FreezeAsync(long id, int status);

    /// <summary>
    /// 设置/取消精选
    /// </summary>
    /// <param name="id">消息ID</param>
    /// <param name="isFeatured">0=取消, 1=精选</param>
    Task SetFeaturedAsync(long id, int isFeatured);

    /// <summary>
    /// 设置排序权重
    /// </summary>
    Task SetSortOrderAsync(long id, int sortOrder);

    /// <summary>
    /// 批量发布消息（IsActive false => true）
    /// </summary>
    /// <param name="ids">消息ID列表</param>
    Task BatchPublishAsync(List<long> ids);
}
