[성현모] CPMeta DB 추가
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class CPMetaContext : DbContext
|
||||
{
|
||||
public CPMetaContext(DbContextOptions<CPMetaContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<tWbmsMetum> tWbmsMeta { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<tWbmsMetum>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.cProductID).HasName("PK_cProductKey");
|
||||
|
||||
entity.HasIndex(e => e.cMacAddress, "UQ_cMacAddress").IsUnique();
|
||||
|
||||
entity.Property(e => e.cProductID).HasMaxLength(50);
|
||||
entity.Property(e => e.cMacAddress).HasMaxLength(50);
|
||||
entity.Property(e => e.cProductNo).HasMaxLength(50);
|
||||
entity.Property(e => e.cSpareValue).HasMaxLength(200);
|
||||
entity.Property(e => e.cType).HasMaxLength(20);
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class tWbmsMetum
|
||||
{
|
||||
public string cProductID { get; set; } = null!;
|
||||
|
||||
public string? cMacAddress { get; set; }
|
||||
|
||||
public string? cType { get; set; }
|
||||
|
||||
public string? cProductNo { get; set; }
|
||||
|
||||
public string? cSpareValue { get; set; }
|
||||
|
||||
public DateTime cDateTime { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user