using HoneyBox.Admin.Business.Models;
using HoneyBox.Admin.Business.Models.Announcement;

namespace HoneyBox.Admin.Business.Services.Interfaces;

/// <summary>
/// 中奖公告管理服务接口
/// </summary>
public interface IAnnouncementService
{
    /// <summary>
    /// 获取公告列表（分页）
    /// </summary>
    /// <param name="page">页码</param>
    /// <param name="pageSize">每页数量</param>
    /// <param name="keyword">搜索关键词（可选，搜索用户名或奖品名称）</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<AnnouncementAdminDto>> GetListAsync(int page = 1, int pageSize = 20, string? keyword = null);

    /// <summary>
    /// 根据ID获取公告详情
    /// </summary>
    /// <param name="id">公告ID</param>
    /// <returns>公告详情</returns>
    Task<AnnouncementAdminDto> GetByIdAsync(int id);

    /// <summary>
    /// 创建公告
    /// </summary>
    /// <param name="request">创建请求</param>
    /// <returns>创建的公告</returns>
    Task<AnnouncementAdminDto> CreateAsync(CreateAnnouncementRequest request);

    /// <summary>
    /// 更新公告
    /// </summary>
    /// <param name="id">公告ID</param>
    /// <param name="request">更新请求</param>
    /// <returns>更新后的公告</returns>
    Task<AnnouncementAdminDto> UpdateAsync(int id, UpdateAnnouncementRequest request);

    /// <summary>
    /// 删除公告
    /// </summary>
    /// <param name="id">公告ID</param>
    /// <returns>是否成功</returns>
    Task<bool> DeleteAsync(int id);

    /// <summary>
    /// 切换公告启用状态
    /// </summary>
    /// <param name="id">公告ID</param>
    /// <returns>更新后的公告</returns>
    Task<AnnouncementAdminDto> ToggleStatusAsync(int id);
}
