[성현모] CPXV2, Log DB프로젝트, DB 컨텍스트 추가

This commit is contained in:
SHM
2025-08-29 09:52:19 +09:00
parent f1d466e17c
commit 0ff4843037
50 changed files with 2999 additions and 0 deletions

View File

@ -0,0 +1,275 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace SystemX.Core.DB;
public partial class CPXV2 : DbContext
{
public CPXV2(DbContextOptions<CPXV2> options)
: base(options)
{
}
public virtual DbSet<HIST_TestListFile> HIST_TestListFiles { get; set; }
public virtual DbSet<HIST_TestListFileLatestStepVersion> HIST_TestListFileLatestStepVersions { get; set; }
public virtual DbSet<HIST_TestListFileVariantList> HIST_TestListFileVariantLists { get; set; }
public virtual DbSet<HIST_TesterSummary> HIST_TesterSummaries { get; set; }
public virtual DbSet<PROD_Group> PROD_Groups { get; set; }
public virtual DbSet<PROD_Release> PROD_Releases { get; set; }
public virtual DbSet<PROD_Variant> PROD_Variants { get; set; }
public virtual DbSet<STAT_Host> STAT_Hosts { get; set; }
public virtual DbSet<STAT_TestCode> STAT_TestCodes { get; set; }
public virtual DbSet<STAT_User> STAT_Users { get; set; }
public virtual DbSet<STOR_TestListFile> STOR_TestListFiles { get; set; }
public virtual DbSet<VRFY_TestListFileRelease> VRFY_TestListFileReleases { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<HIST_TestListFile>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__HIST_Tes__3214D4A8C38F3D8E");
entity.ToTable("HIST_TestListFile");
entity.HasIndex(e => new { e.TestListFileNo, e.Name, e.No }, "CSK_HIST_TestList_2");
entity.Property(e => e.Name).HasMaxLength(64);
entity.HasOne(d => d.TestListFileNoNavigation).WithMany(p => p.HIST_TestListFiles)
.HasForeignKey(d => d.TestListFileNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__HIST_Test__TestL__68487DD7");
});
modelBuilder.Entity<HIST_TestListFileLatestStepVersion>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__HIST_Tes__3214D4A80FA7E1DA");
entity.ToTable("HIST_TestListFileLatestStepVersion");
entity.HasOne(d => d.TestListFileNoNavigation).WithMany(p => p.HIST_TestListFileLatestStepVersions)
.HasForeignKey(d => d.TestListFileNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__HIST_Test__TestL__6754599E");
});
modelBuilder.Entity<HIST_TestListFileVariantList>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__HIST_Tes__3214D4A8BA392490");
entity.ToTable("HIST_TestListFileVariantList");
entity.HasIndex(e => new { e.TestListFileNo, e.No }, "CSK_HIST_TestListFileVariantList_2");
entity.Property(e => e.VariantList).HasMaxLength(2048);
entity.HasOne(d => d.TestListFileNoNavigation).WithMany(p => p.HIST_TestListFileVariantLists)
.HasForeignKey(d => d.TestListFileNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__HIST_Test__TestL__66603565");
});
modelBuilder.Entity<HIST_TesterSummary>(entity =>
{
entity
.HasNoKey()
.ToTable("HIST_TesterSummary");
entity.HasIndex(e => e.No, "UQ__HIST_Tes__3214D4A9D65E09B4").IsUnique();
entity.Property(e => e.Duration).HasMaxLength(16);
entity.Property(e => e.HostID).HasMaxLength(64);
entity.Property(e => e.No).ValueGeneratedOnAdd();
entity.Property(e => e.ProdCode).HasMaxLength(4);
entity.Property(e => e.ProdNo_C).HasMaxLength(32);
entity.Property(e => e.ProdNo_P).HasMaxLength(32);
entity.Property(e => e.ProductID).HasMaxLength(64);
entity.Property(e => e.Result).HasMaxLength(16);
entity.Property(e => e.Section).HasMaxLength(64);
entity.Property(e => e.StationName)
.HasMaxLength(128)
.HasDefaultValue("-");
entity.Property(e => e.StepVersion).HasDefaultValue(-1);
entity.Property(e => e.TestDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.TestListCntID).HasMaxLength(256);
entity.Property(e => e.TestListFileName).HasMaxLength(256);
entity.Property(e => e.TestListFileNo).HasDefaultValue(-1);
entity.Property(e => e.TestListVariantNo).HasDefaultValue(-1);
entity.Property(e => e.TestType).HasMaxLength(8);
entity.Property(e => e.Testcode).HasMaxLength(16);
entity.Property(e => e.Version).HasMaxLength(4);
});
modelBuilder.Entity<PROD_Group>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__PROD_Gro__3214D4A8A3CE9C41");
entity.ToTable("PROD_Group");
entity.HasIndex(e => e.ModelName, "UQ__PROD_Gro__67DC63B5E6F58A45").IsUnique();
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.GroupName).HasMaxLength(128);
entity.Property(e => e.ModelName).HasMaxLength(128);
});
modelBuilder.Entity<PROD_Release>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__PROD_Rel__3214D4A86EAA1A79");
entity.ToTable("PROD_Release");
entity.Property(e => e.Config).HasMaxLength(32);
entity.Property(e => e.ProdNo_C).HasMaxLength(32);
entity.Property(e => e.RegDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.RegUser).HasMaxLength(32);
entity.Property(e => e.RegUserComment).HasMaxLength(256);
entity.HasOne(d => d.TestCodeNoNavigation).WithMany(p => p.PROD_Releases)
.HasForeignKey(d => d.TestCodeNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__PROD_Rele__TestC__6477ECF3");
entity.HasOne(d => d.VariantNoNavigation).WithMany(p => p.PROD_Releases)
.HasForeignKey(d => d.VariantNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__PROD_Rele__Varia__656C112C");
});
modelBuilder.Entity<PROD_Variant>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__PROD_Var__3214D4A8DEBD410D");
entity.ToTable("PROD_Variant");
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.Description).HasMaxLength(256);
entity.Property(e => e.IsUse).HasDefaultValue(true);
entity.Property(e => e.ProdNo_P).HasMaxLength(32);
entity.Property(e => e.RegDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.RegUser).HasMaxLength(32);
entity.Property(e => e.UpdateDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.UpdateUser).HasMaxLength(32);
entity.HasOne(d => d.GroupNoNavigation).WithMany(p => p.PROD_Variants)
.HasForeignKey(d => d.GroupNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__PROD_Vari__Group__628FA481");
entity.HasOne(d => d.TestListFileNoNavigation).WithMany(p => p.PROD_Variants)
.HasForeignKey(d => d.TestListFileNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__PROD_Vari__TestL__6383C8BA");
});
modelBuilder.Entity<STAT_Host>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__STAT_Hos__3214D4A8B3A9E118");
entity.ToTable("STAT_Host");
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.HostID).HasMaxLength(64);
entity.Property(e => e.IP).HasMaxLength(15);
entity.Property(e => e.Section).HasMaxLength(64);
entity.Property(e => e.TestCode).HasMaxLength(16);
entity.Property(e => e.UpdateDT).HasDefaultValueSql("(getdate())");
});
modelBuilder.Entity<STAT_TestCode>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__STAT_Tes__3214D4A8759E255B");
entity.ToTable("STAT_TestCode");
entity.HasIndex(e => e.TestCode, "UQ__STAT_Tes__0B0C35F71EDB4C9E").IsUnique();
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.Gate1).HasMaxLength(64);
entity.Property(e => e.Gate2).HasMaxLength(64);
entity.Property(e => e.TestCode).HasMaxLength(16);
});
modelBuilder.Entity<STAT_User>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__STAT_Use__3214D4A8F88707CA");
entity.ToTable("STAT_User");
entity.HasIndex(e => e.UserID, "UQ__STAT_Use__1788CCAD04FDA05E").IsUnique();
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.Dept).HasMaxLength(64);
entity.Property(e => e.Email).HasMaxLength(64);
entity.Property(e => e.Name).HasMaxLength(32);
entity.Property(e => e.Password).HasMaxLength(32);
entity.Property(e => e.UpdateDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.UserID).HasMaxLength(32);
});
modelBuilder.Entity<STOR_TestListFile>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__STOR_Tes__3214D4A8082195B1");
entity.ToTable("STOR_TestListFile");
entity.Property(e => e.Comment).HasMaxLength(256);
entity.Property(e => e.Description).HasMaxLength(256);
entity.Property(e => e.FileName).HasMaxLength(64);
entity.Property(e => e.Name).HasMaxLength(64);
entity.Property(e => e.ProdCode).HasMaxLength(4);
entity.Property(e => e.RegDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.RegUser).HasMaxLength(32);
entity.Property(e => e.TestType).HasMaxLength(8);
entity.Property(e => e.UpdateDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.UpdateUser).HasMaxLength(32);
entity.Property(e => e.Version).HasMaxLength(4);
});
modelBuilder.Entity<VRFY_TestListFileRelease>(entity =>
{
entity.HasKey(e => e.No).HasName("PK__VRFY_Tes__3214D4A84ACCA9A3");
entity.ToTable("VRFY_TestListFileRelease");
entity.HasIndex(e => new { e.TestListFileNo, e.StepID, e.Enable, e.No }, "CSK_VRFY_Release_2");
entity.Property(e => e.Activate).HasDefaultValue(true);
entity.Property(e => e.Dim).HasMaxLength(64);
entity.Property(e => e.Enable).HasDefaultValue(true);
entity.Property(e => e.Gate).HasMaxLength(128);
entity.Property(e => e.IsGlobal).HasDefaultValue(false);
entity.Property(e => e.MacroParm).HasMaxLength(2048);
entity.Property(e => e.Parm).HasMaxLength(2048);
entity.Property(e => e.SpecMax).HasMaxLength(2048);
entity.Property(e => e.SpecMin).HasMaxLength(2048);
entity.Property(e => e.StepDesc)
.HasMaxLength(2048)
.HasDefaultValue("");
entity.Property(e => e.UpdateDT).HasDefaultValueSql("(getdate())");
entity.Property(e => e.UseFunction).HasMaxLength(2048);
entity.Property(e => e.Variant).HasMaxLength(32);
entity.HasOne(d => d.TestListFileNoNavigation).WithMany(p => p.VRFY_TestListFileReleases)
.HasForeignKey(d => d.TestListFileNo)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK__VRFY_Test__TestL__619B8048");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class HIST_TestListFile
{
public long No { get; set; }
public int? TestListFileNo { get; set; }
public string Name { get; set; } = null!;
public byte[]? TestListData1 { get; set; }
public byte[]? TestListData2 { get; set; }
public byte[]? TestListData3 { get; set; }
public byte[]? TestListData4 { get; set; }
public byte[]? TestListData5 { get; set; }
public byte[]? TestListData6 { get; set; }
public byte[]? TestListData7 { get; set; }
public byte[]? TestListData8 { get; set; }
public byte[]? TestListData9 { get; set; }
public byte[]? TestListData10 { get; set; }
public virtual STOR_TestListFile? TestListFileNoNavigation { get; set; }
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class HIST_TestListFileLatestStepVersion
{
public long No { get; set; }
public int? TestListFileNo { get; set; }
public int LatestStepVersion { get; set; }
public virtual STOR_TestListFile? TestListFileNoNavigation { get; set; }
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class HIST_TestListFileVariantList
{
public long No { get; set; }
public int? TestListFileNo { get; set; }
public string? VariantList { get; set; }
public virtual STOR_TestListFile? TestListFileNoNavigation { get; set; }
}

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class HIST_TesterSummary
{
public long No { get; set; }
public string? StationName { get; set; }
public string TestType { get; set; } = null!;
public string Version { get; set; } = null!;
public string ProdCode { get; set; } = null!;
public int? TestListFileNo { get; set; }
public int? TestListVariantNo { get; set; }
public string? TestListCntID { get; set; }
public int? StepVersion { get; set; }
public string HostID { get; set; } = null!;
public string Section { get; set; } = null!;
public string ProdNo_C { get; set; } = null!;
public string ProdNo_P { get; set; } = null!;
public string Testcode { get; set; } = null!;
public string TestListFileName { get; set; } = null!;
public string ProductID { get; set; } = null!;
public string Result { get; set; } = null!;
public string Duration { get; set; } = null!;
public DateTime TestDT { get; set; }
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class PROD_Group
{
public int No { get; set; }
public string GroupName { get; set; } = null!;
public string ModelName { get; set; } = null!;
public string? Comment { get; set; }
public virtual ICollection<PROD_Variant> PROD_Variants { get; set; } = new List<PROD_Variant>();
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class PROD_Release
{
public int No { get; set; }
public string ProdNo_C { get; set; } = null!;
public int? TestCodeNo { get; set; }
public int? VariantNo { get; set; }
public string Config { get; set; } = null!;
public DateTime RegDT { get; set; }
public string RegUser { get; set; } = null!;
public string? RegUserComment { get; set; }
public virtual STAT_TestCode? TestCodeNoNavigation { get; set; }
public virtual PROD_Variant? VariantNoNavigation { get; set; }
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class PROD_Variant
{
public int No { get; set; }
public string ProdNo_P { get; set; } = null!;
public DateTime RegDT { get; set; }
public string RegUser { get; set; } = null!;
public DateTime UpdateDT { get; set; }
public string UpdateUser { get; set; } = null!;
public int? GroupNo { get; set; }
public string? Comment { get; set; }
public string? Description { get; set; }
public int? TestListFileNo { get; set; }
public int UseTLPosition { get; set; }
public bool IsUse { get; set; }
public virtual PROD_Group? GroupNoNavigation { get; set; }
public virtual ICollection<PROD_Release> PROD_Releases { get; set; } = new List<PROD_Release>();
public virtual STOR_TestListFile? TestListFileNoNavigation { get; set; }
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class STAT_Host
{
public int No { get; set; }
public string HostID { get; set; } = null!;
public string Section { get; set; } = null!;
public string IP { get; set; } = null!;
public string? TestCode { get; set; }
public string? Comment { get; set; }
public DateTime UpdateDT { get; set; }
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class STAT_TestCode
{
public int No { get; set; }
public string TestCode { get; set; } = null!;
public string Gate1 { get; set; } = null!;
public string Gate2 { get; set; } = null!;
public string? Comment { get; set; }
public virtual ICollection<PROD_Release> PROD_Releases { get; set; } = new List<PROD_Release>();
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class STAT_User
{
public int No { get; set; }
public string UserID { get; set; } = null!;
public string Name { get; set; } = null!;
public string Password { get; set; } = null!;
public string Dept { get; set; } = null!;
public string Email { get; set; } = null!;
public string? Comment { get; set; }
public DateTime UpdateDT { get; set; }
}

View File

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class STOR_TestListFile
{
public int No { get; set; }
public string Name { get; set; } = null!;
public string TestType { get; set; } = null!;
public string Version { get; set; } = null!;
public string ProdCode { get; set; } = null!;
public string FileName { get; set; } = null!;
public DateTime RegDT { get; set; }
public string RegUser { get; set; } = null!;
public DateTime UpdateDT { get; set; }
public string UpdateUser { get; set; } = null!;
public string? Comment { get; set; }
public string? Description { get; set; }
public byte[] TestListData { get; set; } = null!;
public virtual ICollection<HIST_TestListFileLatestStepVersion> HIST_TestListFileLatestStepVersions { get; set; } = new List<HIST_TestListFileLatestStepVersion>();
public virtual ICollection<HIST_TestListFileVariantList> HIST_TestListFileVariantLists { get; set; } = new List<HIST_TestListFileVariantList>();
public virtual ICollection<HIST_TestListFile> HIST_TestListFiles { get; set; } = new List<HIST_TestListFile>();
public virtual ICollection<PROD_Variant> PROD_Variants { get; set; } = new List<PROD_Variant>();
public virtual ICollection<VRFY_TestListFileRelease> VRFY_TestListFileReleases { get; set; } = new List<VRFY_TestListFileRelease>();
}

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class VRFY_TestListFileRelease
{
public long No { get; set; }
public int? TestListFileNo { get; set; }
public long StepID { get; set; }
public string Variant { get; set; } = null!;
public string Gate { get; set; } = null!;
public bool? Activate { get; set; }
public int StepVersion { get; set; }
public bool? Enable { get; set; }
public long? Position { get; set; }
public string? StepDesc { get; set; }
public string UseFunction { get; set; } = null!;
public string? MacroParm { get; set; }
public string? Parm { get; set; }
public string SpecMin { get; set; } = null!;
public string SpecMax { get; set; } = null!;
public bool? IsGlobal { get; set; }
public string Dim { get; set; } = null!;
public DateTime UpdateDT { get; set; }
public virtual STOR_TestListFile? TestListFileNoNavigation { get; set; }
}