Files
jdescopingtool/OLD/DataModel/Models/Lot.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

86 lines
2.1 KiB
C#
Executable File

using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE lot model
/// </summary>
public class Lot
{
/// <summary>
/// Lot unique number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Business unit unique code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Short item number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Item number
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Supplier address number
/// </summary>
public long SupplierCode { get; set; }
/// <summary>
/// Lot status code
/// </summary>
public char StatusCode { get; set; }
/// <summary>
/// Memo line 1
/// </summary>
public string Memo1 { get; set; }
/// <summary>
/// Memo line 2
/// </summary>
public string Memo2 { get; set; }
/// <summary>
/// Memo line 3
/// </summary>
public string Memo3 { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public LotViewModel ToViewModel()
{
return new LotViewModel()
{
LotNumber = LotNumber,
ItemNumber = ItemNumber
};
}
}
}