refactor: remove unused classes and consolidate ViewModels in Core
Remove 9 unused types from Core (duplicate extension classes, TableSpec, ColumnSpec, LotLocation), move ComponentLotViewModel and OperatorViewModel from Client to Core, and refactor DataSync.Dev to use pipeline-based configuration. Fix Login.razor to use UserInfoDto directly.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using JdeScoping.Core.Models;
|
||||
using JdeScoping.Core.ApiContracts.Auth;
|
||||
|
||||
namespace JdeScoping.Core.Models.Auth;
|
||||
|
||||
@@ -11,4 +11,4 @@ namespace JdeScoping.Core.Models.Auth;
|
||||
public record LoginResultModel(
|
||||
bool Success,
|
||||
string? ErrorMessage,
|
||||
UserInfo? User);
|
||||
UserInfoDto? User);
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
namespace JdeScoping.Core.Models.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Database column specification
|
||||
/// </summary>
|
||||
public class ColumnSpec
|
||||
{
|
||||
/// <summary>
|
||||
/// Column name
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Column definition (SQL type and constraints)
|
||||
/// </summary>
|
||||
public string Definition { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public ColumnSpec()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with name and definition
|
||||
/// </summary>
|
||||
/// <param name="name">Column name</param>
|
||||
/// <param name="definition">Column definition</param>
|
||||
public ColumnSpec(string name, string definition)
|
||||
{
|
||||
Name = name;
|
||||
Definition = definition;
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
namespace JdeScoping.Core.Models.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Database table specification for dynamic SQL generation
|
||||
/// </summary>
|
||||
public class TableSpec
|
||||
{
|
||||
/// <summary>
|
||||
/// Table name
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Temporary table name (computed as # + Name)
|
||||
/// </summary>
|
||||
public string TempTableName => $"#{Name}";
|
||||
|
||||
/// <summary>
|
||||
/// Table columns
|
||||
/// </summary>
|
||||
public List<ColumnSpec> Columns { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Table columns that form the primary key
|
||||
/// </summary>
|
||||
public List<ColumnSpec> PrimaryKey { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public TableSpec()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with table name
|
||||
/// </summary>
|
||||
/// <param name="name">Table name</param>
|
||||
public TableSpec(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates SQL for creating an index on the primary key (stub)
|
||||
/// </summary>
|
||||
/// <returns>SQL CREATE INDEX statement</returns>
|
||||
public string GenerateIndex()
|
||||
{
|
||||
// Stub implementation - to be expanded based on spec
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates SQL for dropping the table (stub)
|
||||
/// </summary>
|
||||
/// <returns>SQL DROP TABLE statement</returns>
|
||||
public string GenerateDrop()
|
||||
{
|
||||
// Stub implementation - to be expanded based on spec
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates SQL for creating the table (stub)
|
||||
/// </summary>
|
||||
/// <returns>SQL CREATE TABLE statement</returns>
|
||||
public string GenerateCreate()
|
||||
{
|
||||
// Stub implementation - to be expanded based on spec
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a column specification by name (stub)
|
||||
/// </summary>
|
||||
/// <param name="columnName">Name of column to find</param>
|
||||
/// <returns>ColumnSpec or null if not found</returns>
|
||||
public ColumnSpec? GetColumn(string columnName)
|
||||
{
|
||||
return Columns.Find(c => c.Name == columnName);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace JdeScoping.Core.Models.Inventory;
|
||||
|
||||
/// <summary>
|
||||
/// JDE lot location entity
|
||||
/// </summary>
|
||||
public class LotLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// Lot unique number
|
||||
/// </summary>
|
||||
public string LotNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Short item number
|
||||
/// </summary>
|
||||
public long ShortItemNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Business unit unique code
|
||||
/// </summary>
|
||||
public string BranchCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Location code where lot is located
|
||||
/// </summary>
|
||||
public string Location { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of last update to record
|
||||
/// </summary>
|
||||
public DateTime? LastUpdateDt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user