[성현모] CPXV2, Log DB프로젝트, DB 컨텍스트 추가
This commit is contained in:
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class CPXV2Log : DbContext
|
||||
{
|
||||
public CPXV2Log(DbContextOptions<CPXV2Log> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<HIST_LogSummary> HIST_LogSummaries { get; set; }
|
||||
|
||||
public virtual DbSet<HIST_TestResult> HIST_TestResults { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<HIST_LogSummary>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.No);
|
||||
|
||||
entity.ToTable("HIST_LogSummary");
|
||||
|
||||
entity.HasIndex(e => new { e.TestDT, e.No }, "HIST_LogSummary_2");
|
||||
|
||||
entity.HasIndex(e => e.TestDT, "HIST_LogSummary_3");
|
||||
|
||||
entity.HasIndex(e => e.No, "UQ__HIST_Log__3214D4A98E941729").IsUnique();
|
||||
|
||||
entity.Property(e => e.Duration).HasMaxLength(16);
|
||||
entity.Property(e => e.HostID).HasMaxLength(64);
|
||||
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<HIST_TestResult>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.No);
|
||||
|
||||
entity.ToTable("HIST_TestResult");
|
||||
|
||||
entity.HasIndex(e => new { e.TestDT, e.No }, "HIST_TestResult_2");
|
||||
|
||||
entity.HasIndex(e => e.TestDT, "HIST_TestResult_3");
|
||||
|
||||
entity.Property(e => e.No).ValueGeneratedNever();
|
||||
entity.Property(e => e.TestDT).HasDefaultValueSql("(getdate())");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class HIST_LogSummary
|
||||
{
|
||||
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; }
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class HIST_TestResult
|
||||
{
|
||||
public long No { get; set; }
|
||||
|
||||
public DateTime? TestDT { get; set; }
|
||||
|
||||
public string LogData { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user