using HoneyBox.Admin.Business.Models;
using HoneyBox.Admin.Business.Models.Task;

namespace HoneyBox.Admin.Business.Services.Interfaces;

/// <summary>
/// 任务管理服务接口（后台管理）
/// </summary>
public interface IAdminTaskService
{
    /// <summary>
    /// 获取任务列表（分页）
    /// </summary>
    /// <param name="request">分页请求</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<TaskResponse>> GetTasksAsync(TaskListRequest request);

    /// <summary>
    /// 获取任务详情
    /// </summary>
    /// <param name="id">任务ID</param>
    /// <returns>任务详情</returns>
    Task<TaskResponse?> GetTaskByIdAsync(int id);

    /// <summary>
    /// 创建任务
    /// </summary>
    /// <param name="request">创建请求</param>
    /// <returns>新创建的任务ID</returns>
    Task<int> CreateTaskAsync(TaskCreateRequest request);

    /// <summary>
    /// 更新任务
    /// </summary>
    /// <param name="id">任务ID</param>
    /// <param name="request">更新请求</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateTaskAsync(int id, TaskUpdateRequest request);

    /// <summary>
    /// 删除任务（软删除）
    /// </summary>
    /// <param name="id">任务ID</param>
    /// <returns>是否成功</returns>
    Task<bool> DeleteTaskAsync(int id);
}
