[성현모] VPKI_DataDB DB프로젝트 추가, DB스크립트 추가

This commit is contained in:
SHM
2025-08-05 10:14:25 +09:00
parent 721fa6e29b
commit ca0fa3d2a4
24 changed files with 835 additions and 0 deletions

View File

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace SystemX.Core.DB;
public partial class VPKI_DataDBContext : DbContext
{
public VPKI_DataDBContext(DbContextOptions<VPKI_DataDBContext> options)
: base(options)
{
}
public virtual DbSet<tCertificate> tCertificates { get; set; }
public virtual DbSet<tOcsp> tOcsps { get; set; }
public virtual DbSet<tTbscsr> tTbscsrs { get; set; }
public virtual DbSet<tVerifyResult> tVerifyResults { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<tCertificate>(entity =>
{
entity.HasKey(e => e.cCuid).HasName("PK__tCertifi__2AA00D94D7A91CE3");
entity.ToTable("tCertificate");
entity.Property(e => e.cCuid).ValueGeneratedNever();
entity.Property(e => e.cBrandCode).HasMaxLength(20);
entity.Property(e => e.cCert).HasMaxLength(2048);
entity.Property(e => e.cCsr).HasMaxLength(2048);
entity.Property(e => e.cCsrsignature).HasMaxLength(1024);
entity.Property(e => e.cLocalCode).HasMaxLength(20);
entity.Property(e => e.cMessage).HasMaxLength(250);
entity.Property(e => e.cTierCode).HasMaxLength(20);
entity.Property(e => e.cUnitCode).HasMaxLength(20);
entity.Property(e => e.cVehicleCode).HasMaxLength(20);
});
modelBuilder.Entity<tOcsp>(entity =>
{
entity.HasKey(e => e.cCuid).HasName("PK__tOcsp__2AA00D94489D8AA6");
entity.ToTable("tOcsp");
entity.Property(e => e.cCuid).ValueGeneratedNever();
entity.Property(e => e.cStatus).HasMaxLength(20);
entity.Property(e => e.cVerify).HasMaxLength(20);
});
modelBuilder.Entity<tTbscsr>(entity =>
{
entity.HasKey(e => e.cCuid).HasName("PK__tTbscsr__2AA00D9463096B25");
entity.ToTable("tTbscsr");
entity.Property(e => e.cCertType).HasMaxLength(20);
entity.Property(e => e.cDc).HasMaxLength(20);
entity.Property(e => e.cDn).HasMaxLength(250);
entity.Property(e => e.cHashedTbscsr).HasMaxLength(1024);
entity.Property(e => e.cIdType).HasMaxLength(10);
entity.Property(e => e.cIftid).HasMaxLength(100);
entity.Property(e => e.cMacaddr).HasMaxLength(100);
entity.Property(e => e.cOriginTbscsr).HasMaxLength(4000);
entity.Property(e => e.cPcid).HasMaxLength(50);
entity.Property(e => e.cPublickey).HasMaxLength(1024);
entity.Property(e => e.cSupplierId).HasMaxLength(10);
entity.Property(e => e.cTierCode).HasMaxLength(20);
entity.Property(e => e.cUnitCode).HasMaxLength(20);
entity.Property(e => e.cWmi).HasMaxLength(20);
});
modelBuilder.Entity<tVerifyResult>(entity =>
{
entity.HasKey(e => e.cCuid).HasName("PK__tVerifyR__2AA00D94B21AB01E");
entity.ToTable("tVerifyResult");
entity.Property(e => e.cCuid).ValueGeneratedNever();
entity.Property(e => e.cResult)
.HasMaxLength(20)
.IsFixedLength();
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tCertificate
{
public long cCuid { get; set; }
public string cCsrsignature { get; set; } = null!;
public string cTierCode { get; set; } = null!;
public string cUnitCode { get; set; } = null!;
public string cVehicleCode { get; set; } = null!;
public string cLocalCode { get; set; } = null!;
public string cBrandCode { get; set; } = null!;
public string cCsr { get; set; } = null!;
public string cCert { get; set; } = null!;
public string cMessage { get; set; } = null!;
public int cIssueCount { get; set; }
public DateTime cDateTime { get; set; }
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tOcsp
{
public long cCuid { get; set; }
public string cStatus { get; set; } = null!;
public string cVerify { get; set; } = null!;
public string? cOcsp { get; set; }
public DateTime cDateTime { get; set; }
}

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tTbscsr
{
public long cCuid { get; set; }
public string cIftid { get; set; } = null!;
public string cMacaddr { get; set; } = null!;
public string cWmi { get; set; } = null!;
public string cIdType { get; set; } = null!;
public string cSupplierId { get; set; } = null!;
public string cDc { get; set; } = null!;
public string cTierCode { get; set; } = null!;
public string cUnitCode { get; set; } = null!;
public string cPublickey { get; set; } = null!;
public string cCertType { get; set; } = null!;
public string cOriginTbscsr { get; set; } = null!;
public string cHashedTbscsr { get; set; } = null!;
public string cPcid { get; set; } = null!;
public string cDn { get; set; } = null!;
public DateTime cDateTime { get; set; }
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tVerifyResult
{
public long cCuid { get; set; }
public string cResult { get; set; } = null!;
}