using EC.Entity.CameraInfo; using Microsoft.EntityFrameworkCore; #nullable disable namespace EC.Service.CameraInfo { public class LogInfoContext : BaseDbContext { public LogInfoContext() { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(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); } } }