using CoreSearchResult = JdeScoping.Core.Models.SearchResults.SearchResult;
using CoreMisSearchResult = JdeScoping.Core.Models.SearchResults.MisSearchResult;
using CoreMisNonMatchSearchResult = JdeScoping.Core.Models.SearchResults.MisNonMatchSearchResult;
namespace JdeScoping.ExcelIO.Models.Reporting;
///
/// Reporting search data model for Excel export.
///
public class SearchModel
{
///
/// PK ID of search.
///
public int Id { get; set; }
///
/// User name of user that created search.
///
public string UserName { get; set; } = string.Empty;
///
/// User-friendly name for search.
///
public string Name { get; set; } = string.Empty;
///
/// Timestamp search was submitted.
///
public DateTime? SubmitDt { get; set; }
///
/// Timestamp search was started.
///
public DateTime? StartDt { get; set; }
///
/// Timestamp search was completed.
///
public DateTime? EndDt { get; set; }
///
/// Minimum timestamp to include.
///
public DateTime? MinimumDt { get; set; }
///
/// Maximum timestamp to include.
///
public DateTime? MaximumDt { get; set; }
///
/// Whether or not timespan filter is enabled.
///
public bool TimespanFilterEnabled => MinimumDt.HasValue || MaximumDt.HasValue;
///
/// Collection of work order numbers to include.
///
public List WorkOrderFilter { get; set; } = [];
///
/// Whether or not work order filter is enabled.
///
public bool WorkOrderFilterEnabled => WorkOrderFilter.Count > 0;
///
/// Collection of item numbers to include.
///
public List ItemNumberFilter { get; set; } = [];
///
/// Whether or not item number filter is enabled.
///
public bool ItemNumberFilterEnabled => ItemNumberFilter.Count > 0;
///
/// Collection of included profit centers.
///
public List ProfitCenterFilter { get; set; } = [];
///
/// Whether or not profit center filter is enabled.
///
public bool ProfitCenterFilterEnabled => ProfitCenterFilter.Count > 0;
///
/// Collection of included work centers.
///
public List WorkCenterFilter { get; set; } = [];
///
/// Whether or not work center filter is enabled.
///
public bool WorkCenterFilterEnabled => WorkCenterFilter.Count > 0;
///
/// Collection of included operator IDs.
///
public List OperatorFilter { get; set; } = [];
///
/// Whether or not operator filter is enabled.
///
public bool OperatorFilterEnabled => OperatorFilter.Count > 0;
///
/// Collection of included upper level lot numbers.
///
public List ComponentLotFilter { get; set; } = [];
///
/// Whether or not component lot filter is enabled.
///
public bool ComponentLotFilterEnabled => ComponentLotFilter.Count > 0;
///
/// List of part/operation combinations for MIS filtering.
///
public List ItemOperationMisFilter { get; set; } = [];
///
/// Whether or not item/operation/MIS filter is enabled.
///
public bool ItemOperationMisFilterEnabled => ItemOperationMisFilter.Count > 0;
///
/// Whether or not to extract MIS data.
///
public bool ExtractMisData { get; set; }
///
/// Work order search results.
///
public List Results { get; set; } = [];
///
/// MIS results.
///
public List? MisResults { get; set; }
///
/// MIS no match found results.
///
public List? MisNonMatchResults { get; set; }
}