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.
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using JdeScoping.Core.Models.Enums;
|
||||
|
||||
namespace JdeScoping.Core.Models.Search;
|
||||
|
||||
/// <summary>
|
||||
/// User search request entity
|
||||
/// </summary>
|
||||
public class Search
|
||||
{
|
||||
/// <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; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User-friendly name for search
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Current search status
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public SearchStatus Status { 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>
|
||||
/// JSON-packed search criteria (stored in database)
|
||||
/// </summary>
|
||||
public string CriteriaJson { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Search criteria (deserialized from CriteriaJSON)
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public SearchCriteria? Criteria
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(CriteriaJson))
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
return JsonSerializer.Deserialize<SearchCriteria>(CriteriaJson);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
CriteriaJson = value != null
|
||||
? JsonSerializer.Serialize(value)
|
||||
: string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Excel search results file (binary)
|
||||
/// </summary>
|
||||
public byte[]? Results { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user