using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class SysSqlQucikCheckMap : EntityTypeConfiguration { public SysSqlQucikCheckMap() { // Primary Key this.HasKey(t => t.Id); // Properties this.Property(t => t.Id) .IsRequired() .HasMaxLength(50); this.Property(t => t.SqlName) .HasMaxLength(50); this.Property(t => t.IsLocked) .IsFixedLength() .HasMaxLength(1); // Table & Column Mappings this.ToTable("SysSqlQucikCheck"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.SqlName).HasColumnName("SqlName"); this.Property(t => t.SqlContent).HasColumnName("SqlContent"); this.Property(t => t.Remark).HasColumnName("Remark"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); } } }