You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

50 lines
1.0 KiB

using EC.Entity.CameraInfo;
using Microsoft.EntityFrameworkCore;
#nullable disable
namespace EC.Service.CameraInfo
{
public class LogInfoContext : BaseDbContext<LogInfo>
{
public LogInfoContext()
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<LogInfo>(entity =>
{
entity.HasKey(e => e.LogId);
entity.ToTable("LogInfo");
entity.Property(e => e.LogId)
.ValueGeneratedNever()
.HasColumnName("LogID");
entity.Property(e => e.LogCh).HasColumnType("VARCHAR (50)");
entity.Property(e => e.LogContent)
.IsRequired()
.HasColumnType("VARCHAR (100)");
entity.Property(e => e.LogMark).HasColumnType("VARCHAR (200)");
entity.Property(e => e.LogType)
.IsRequired()
.HasColumnType("VARCHAR (10)");
entity.Property(e => e.TriggerTime)
.IsRequired()
.HasColumnType("VARCHAR (19)");
entity.Property(e => e.UserName)
.IsRequired()
.HasColumnType("VARCHAR (20)");
});
OnModelCreatingPartial(modelBuilder);
}
}
}