using System.Collections.Generic;

namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Output
{
    /// <summary>
    /// 单个任务操作结果
    /// </summary>
    public class SingleTaskOperationResult
    {
        /// <summary>
        /// 任务ID
        /// </summary>
        public long TaskId { get; set; }

        /// <summary>
        /// 操作是否成功
        /// </summary>
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 操作消息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 错误详情
        /// </summary>
        public List<string> ErrorDetails { get; set; } = new List<string>();
    }

    /// <summary>
    /// 批量操作结果输出
    /// </summary>
    public class BatchWorkOrderOperationResult
    {
        /// <summary>
        /// 总体操作是否成功
        /// </summary>
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 总体操作消息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 总任务数
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 成功任务数
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败任务数
        /// </summary>
        public int FailedCount { get; set; }

        /// <summary>
        /// 每个任务的操作结果
        /// </summary>
        public List<SingleTaskOperationResult> TaskResults { get; set; } = new List<SingleTaskOperationResult>();

        /// <summary>
        /// 影响的整合记录ID列表
        /// </summary>
        public List<long> AffectedIntegrationRecordIds { get; set; } = new List<long>();
    }
}