namespace QYZH.InteractiveMagazine.Models.Dto.UserAnswerTaskService;

/// <summary>
/// 批量领取任务积分输入
/// </summary>
public class BatchClaimPointsInput
{
    /// <summary>
    /// 任务分组Id列表（JournalPageTaskGroupId）
    /// </summary>
    public List<long> GroupIds { get; set; } = [];
}

/// <summary>
/// 批量领取任务积分输出
/// </summary>
public class BatchClaimPointsOutput
{
    /// <summary>
    /// 成功领取数量
    /// </summary>
    public int SuccessCount { get; set; }

    /// <summary>
    /// 失败数量
    /// </summary>
    public int FailCount { get; set; }

    /// <summary>
    /// 成功领取详情列表
    /// </summary>
    public List<BatchClaimSuccessItem> SuccessItems { get; set; } = [];

    /// <summary>
    /// 失败详情
    /// </summary>
    public List<BatchClaimFailItem> FailItems { get; set; } = [];
}

/// <summary>
/// 批量领取成功项
/// </summary>
public class BatchClaimSuccessItem
{
    /// <summary>
    /// 任务编号（从 JournalPageTask.No 字段按 - 分割取索引2，前面加"任务"）
    /// </summary>
    public string TaskNo { get; set; }

    /// <summary>
    /// 积分值
    /// </summary>
    public int Points { get; set; }

    /// <summary>
    /// 成长值
    /// </summary>
    public int GrowthPoints { get; set; }

    /// <summary>
    /// 题目得分
    /// </summary>
    public float Score { get; set; }
}

/// <summary>
/// 批量领取失败项
/// </summary>
public class BatchClaimFailItem
{
    /// <summary>
    /// 任务分组Id
    /// </summary>
    public long GroupId { get; set; }

    /// <summary>
    /// 失败原因
    /// </summary>
    public string Message { get; set; }
}
