Files
KArtSell.Aegis/docs/Design/kbx-foundation-v52-fe-operational-navigation-screen-anatomy/backend/Shared/Excel/ImportFieldDefinitionFactory.cs
T
kjh2064 c41e5063b7 chore: remove kbx-foundation-v36 reference (superseded by v4 implementation)
Removed entire kbx-foundation-v36 directory as it's been replaced by
the new KBX Foundation v4 patterns implemented in this session:
- Registry-driven screen definitions
- Density-aware UI adapter components
- Feature module templates (ShadowRun, Models)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-12 01:39:58 +09:00

27 lines
878 B
C#

using Kbx.Contracts.Generated;
namespace Shared.Excel;
public static class ImportFieldDefinitionFactory
{
public static ImportFieldDefinition FromKbxField(string key, bool? required = null, string? label = null)
{
var field = KbxFieldCatalog.Get(key);
if (!field.Importable)
throw new InvalidOperationException($"KBX field '{key}' is not importable.");
return new ImportFieldDefinition(
Key: field.Key,
Label: label ?? field.Label,
Aliases: field.Aliases,
DataType: field.DataType,
Required: required ?? field.Required,
MaxLength: field.MaxLength,
Precision: field.Precision,
Scale: field.Scale,
LookupEntity: field.LookupEntity,
Importable: field.Importable,
Exportable: field.Exportable);
}
}