using PARR.Domain.Cache.Models;

namespace PARR.Domain.DTOs.Matching
{
    /// <summary>
    /// Статус matching`a
    /// </summary>
    public class MatchingStatus
    {
        /// <summary>
        /// В целом по искомому объекту, идет ли matching
        /// </summary>
        public bool IsMatchingObject => IsMatchingJobs || IsMatchingJobGroups;

        /// <summary>
        /// Идет ли мэтчинг по Jobs
        /// </summary>
        public bool IsMatchingJobs => DetailsJobs?.Any() ?? false;

        /// <summary>
        /// Идет ли мэтчинг по JobGroups
        /// </summary>
        public bool IsMatchingJobGroups => DetailsJobGroups?.Any() ?? false;

        /// <summary>
        /// Детально из КЭШ по Jobs
        /// </summary>
        public List<MatchingStatusItem>? DetailsJobs { get; set; }

        /// <summary>
        /// Детально из КЭШ по JobGroups
        /// </summary>
        public List<MatchingStatusItem>? DetailsJobGroups { get; set; }

    }
}
