[성현모] Scaffold

This commit is contained in:
SHM
2025-10-30 09:38:48 +09:00
parent 690b26d4da
commit 05fb9a64e1
4 changed files with 33 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -11,10 +11,26 @@ public partial class UniqueKeyDBContext : DbContext
{
}
public virtual DbSet<tPairKeyStorage> tPairKeyStorages { get; set; }
public virtual DbSet<tUniqueKeyStorage> tUniqueKeyStorages { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<tPairKeyStorage>(entity =>
{
entity.HasKey(e => e.cPrimaryKey).HasName("PK_cProductKey");
entity.ToTable("tPairKeyStorage");
entity.HasIndex(e => e.cSecondaryKey, "UQ_cMacAddress").IsUnique();
entity.Property(e => e.cPrimaryKey).HasMaxLength(50);
entity.Property(e => e.cSecondaryKey).HasMaxLength(50);
entity.Property(e => e.cValue1).HasMaxLength(200);
entity.Property(e => e.cValue2).HasMaxLength(200);
});
modelBuilder.Entity<tUniqueKeyStorage>(entity =>
{
entity.HasKey(e => e.cIdentity).HasName("PK__tUniqueK__3EBC650DADDCD506");

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tPairKeyStorage
{
public string cPrimaryKey { get; set; } = null!;
public string cSecondaryKey { get; set; } = null!;
public string? cValue1 { get; set; }
public string? cValue2 { get; set; }
public DateTime cDateTime { get; set; }
}