[성현모] CPMeta 기능 구현 완료

This commit is contained in:
SHM
2025-10-30 16:51:52 +09:00
parent 765f6c6378
commit b78e5a23ea
16 changed files with 518 additions and 80 deletions

View File

@ -58,9 +58,10 @@
<ItemGroup>
<Folder Include="Properties" />
<Folder Include="dbo" />
<Folder Include="dbo\Tables" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\tWbmsMeta.sql" />
<Build Include="dbo\Tables\tWbmsMeta.sql" />
</ItemGroup>
<PropertyGroup>
<PostBuildEvent>xcopy /y $(ProjectDir)$(OutputPath)$(TargetName)_Create.sql $(SolutionDir)..\..\DBPatch\sqlScripts\

View File

@ -1,7 +1,8 @@
CREATE TABLE [dbo].[tWbms]
(
[cProductID] NVARCHAR(50) NOT NULL,
[cMacAddress] NVARCHAR(50) NULL,
[cMacAddress1] NVARCHAR(50) NULL,
[cMacAddress2] NVARCHAR(50) NULL,
[cType] NVARCHAR(20) NULL,
[cProductNo] NVARCHAR(50) NULL,
@ -9,5 +10,6 @@
[cDateTime] DATETIME2 NOT NULL,
CONSTRAINT PK_cProductKey PRIMARY KEY (cProductID),
CONSTRAINT UQ_cMacAddress UNIQUE (cMacAddress),
CONSTRAINT UQ_cMacAddress1 UNIQUE (cMacAddress1),
CONSTRAINT UQ_cMacAddress2 UNIQUE (cMacAddress2),
)

View File

@ -21,10 +21,13 @@ public partial class CPMetaContext : DbContext
{
entity.HasKey(e => e.cProductID).HasName("PK_cProductKey");
entity.HasIndex(e => e.cMacAddress, "UQ_cMacAddress").IsUnique();
entity.HasIndex(e => e.cMacAddress1, "UQ_cMacAddress1").IsUnique();
entity.HasIndex(e => e.cMacAddress2, "UQ_cMacAddress2").IsUnique();
entity.Property(e => e.cProductID).HasMaxLength(50);
entity.Property(e => e.cMacAddress).HasMaxLength(50);
entity.Property(e => e.cMacAddress1).HasMaxLength(50);
entity.Property(e => e.cMacAddress2).HasMaxLength(50);
entity.Property(e => e.cProductNo).HasMaxLength(50);
entity.Property(e => e.cSpareValue).HasMaxLength(200);
entity.Property(e => e.cType).HasMaxLength(20);

View File

@ -7,7 +7,9 @@ public partial class tWbms
{
public string cProductID { get; set; } = null!;
public string? cMacAddress { get; set; }
public string? cMacAddress1 { get; set; }
public string? cMacAddress2 { get; set; }
public string? cType { get; set; }