using System.Collections.Generic;
using NPP.SmartSchedue.Api.Contracts.Services.Integration.Output;

namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Internal
{
    /// <summary>
    /// 最终业务规则验证结果
    /// 业务用途：对遗传算法输出进行严格的业务规则二次验证的结果
    /// </summary>
    public class FinalValidationResult
    {
        /// <summary>
        /// 是否通过验证
        /// </summary>
        public bool IsValid { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;

        /// <summary>
        /// 违规详情列表
        /// </summary>
        public List<GlobalConflictDetectionInfo> Violations { get; set; } = new List<GlobalConflictDetectionInfo>();

        /// <summary>
        /// 验证的任务数量
        /// </summary>
        public int ValidatedTaskCount { get; set; }

        /// <summary>
        /// 检测到的违规数量
        /// </summary>
        public int ViolationCount => Violations.Count;
    }
}