| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class SysFunctionMap : EntityTypeConfiguration<SysFunction>
- {
- public SysFunctionMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.FunctionName)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.FatherID)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.ActionName)
- .HasMaxLength(150);
- this.Property(t => t.ControllerName)
- .HasMaxLength(150);
- this.Property(t => t.URL)
- .HasMaxLength(500);
- this.Property(t => t.IsLeaf)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.Path)
- .IsRequired()
- .HasMaxLength(500);
- this.Property(t => t.IsFront)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsBack)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsBrowse)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsAdd)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsUpdate)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsDelete)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsAudit)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsPrint)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.UserIDLastMod)
- .HasMaxLength(30);
- this.Property(t => t.PageName)
- .HasMaxLength(300);
- // Table & Column Mappings
- this.ToTable("SysFunctions");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.FunctionName).HasColumnName("FunctionName");
- this.Property(t => t.FatherID).HasColumnName("FatherID");
- this.Property(t => t.ActionName).HasColumnName("ActionName");
- this.Property(t => t.ControllerName).HasColumnName("ControllerName");
- this.Property(t => t.URL).HasColumnName("URL");
- this.Property(t => t.Depth).HasColumnName("Depth");
- this.Property(t => t.IsLeaf).HasColumnName("IsLeaf");
- this.Property(t => t.Sort).HasColumnName("Sort");
- this.Property(t => t.Path).HasColumnName("Path");
- this.Property(t => t.IsFront).HasColumnName("IsFront");
- this.Property(t => t.IsBack).HasColumnName("IsBack");
- this.Property(t => t.IsBrowse).HasColumnName("IsBrowse");
- this.Property(t => t.IsAdd).HasColumnName("IsAdd");
- this.Property(t => t.IsUpdate).HasColumnName("IsUpdate");
- this.Property(t => t.IsDelete).HasColumnName("IsDelete");
- this.Property(t => t.IsAudit).HasColumnName("IsAudit");
- this.Property(t => t.IsPrint).HasColumnName("IsPrint");
- this.Property(t => t.TimeCreated).HasColumnName("TimeCreated");
- this.Property(t => t.TimeLastMod).HasColumnName("TimeLastMod");
- this.Property(t => t.UserIDLastMod).HasColumnName("UserIDLastMod");
- this.Property(t => t.PageName).HasColumnName("PageName");
- }
- }
- }
|