Files
jdescopingtool/OLD/WorkerService/Models/Reporting/SearchModel.cs
T
Joseph Doherty 26ff8d9b4f Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/),
new .NET 10 Blazor solution (NEW/), OpenSpec specifications,
documentation, and project configuration.
2026-01-02 07:43:29 -05:00

148 lines
5.1 KiB
C#
Executable File

using System;
using System.Collections.Generic;
using System.Linq;
namespace WorkerService.Models.Reporting
{
/// <summary>
/// Reporting search data model
/// </summary>
public class SearchModel
{
/// <summary>
/// PK ID of search
/// </summary>
public int ID { get; set; }
/// <summary>
/// User name of user that created search
/// </summary>
public string UserName { get; set; }
/// <summary>
/// User-friendly name for search
/// </summary>
public string Name { get; set; }
/// <summary>
/// Timestamp search was submitted
/// </summary>
public DateTime? SubmitDT { get; set; }
/// <summary>
/// Timestamp search was started
/// </summary>
public DateTime? StartDT { get; set; }
/// <summary>
/// Timestamp search was completed
/// </summary>
public DateTime? EndDT { get; set; }
/// <summary>
/// Minimum timestamp to include
/// </summary>
public DateTime? MinimumDT { get; set; }
/// <summary>
/// Maxmimum timestamp to include
/// </summary>
public DateTime? MaximumDT { get; set; }
/// <summary>
/// Whether or not timespan filter is enabled
/// </summary>
public bool TimespanFilterEnabled => (MinimumDT.HasValue || MaximumDT.HasValue);
/// <summary>
/// Collection of workorder numbers to include
/// </summary>
public List<WorkOrderFilterEntry> WorkOrderFilter { get; set; } = new List<WorkOrderFilterEntry>();
/// <summary>
/// Whether or not work order filter is enabled
/// </summary>
public bool WorkOrderFilterEnabled => WorkOrderFilter != null && WorkOrderFilter.Any();
/// <summary>
/// Collection of item numbers to include
/// </summary>
public List<ItemNumberFilterEntry> ItemNumberFilter { get; set; } = new List<ItemNumberFilterEntry>();
/// <summary>
/// Whether or not item number filter is enabled
/// </summary>
public bool ItemNumberFilterEnabled => ItemNumberFilter != null && ItemNumberFilter.Any();
/// <summary>
/// Collection of included profit centers
/// </summary>
public List<ProfitCenterFilterEntry> ProfitCenterFilter { get; set; } = new List<ProfitCenterFilterEntry>();
/// <summary>
/// Whether or not profit center filter is enabled
/// </summary>
public bool ProfitCenterFilterEnabled => ProfitCenterFilter != null && ProfitCenterFilter.Any();
/// <summary>
/// Collection of included work centers
/// </summary>
public List<WorkCenterFilterEntry> WorkCenterFilter { get; set; } = new List<WorkCenterFilterEntry>();
/// <summary>
/// Whether or not work center filter is enabled
/// </summary>
public bool WorkCenterFilterEnabled => WorkCenterFilter != null && WorkCenterFilter.Any();
/// <summary>
/// Collection of included operator IDs
/// </summary>
public List<OperatorFilterEntry> OperatorFilter { get; set; } = new List<OperatorFilterEntry>();
/// <summary>
/// Whether or not operator filter is enabled
/// </summary>
public bool OperatorFilterEnabled => OperatorFilter != null && OperatorFilter.Any();
/// <summary>
/// Collection of included upper level lot numbers
/// </summary>
public List<ComponentLotFilterEntry> ComponentLotFilter { get; set; } = new List<ComponentLotFilterEntry>();
/// <summary>
/// Whether or not component lot filter is enabled
/// </summary>
public bool ComponentLotFilterEnabled => ComponentLotFilter != null && ComponentLotFilter.Any();
/// <summary>
/// List of part/operation combinations for MIS filtering
/// </summary>
public List<ItemOperationMisFilterEntry> ItemOperationMisFilter { get; set; } = new List<ItemOperationMisFilterEntry>();
/// <summary>
/// Whether or not item/operation/mis filter is enabled
/// </summary>
public bool ItemOperationMisFilterEnabled => ItemOperationMisFilter != null && ItemOperationMisFilter.Any();
/// <summary>
/// Whether or not to extract MIS data
/// </summary>
public bool ExtractMisData { get; set; }
/// <summary>
/// Work order search results
/// </summary>
public List<SearchResult> Results { get; set; } = new List<SearchResult>();
/// <summary>
/// MIS results
/// </summary>
public List<MisSearchResult> MisResults { get; set; } = new List<MisSearchResult>();
/// <summary>
/// MIS no match found results
/// </summary>
public List<MisNonMatchSearchResult> MisNonMatchResults { get; set; } = new List<MisNonMatchSearchResult>();
}
}