using APT.Infrastructure.Core; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace APT.Infrastructure.EF.Map { public class FMOrganizationMap : TreeEntityBaseMap { public void Configure(EntityTypeBuilder builder) { base.Configure(builder); builder.Property(t => t.CODE).HasMaxLength(50); builder.Property(t => t.TENANT_CODE).HasMaxLength(10); builder.Property(t => t.NAME).HasMaxLength(50); builder.Property(t => t.DESC).HasMaxLength(100); //builder.HasOne(t => t.Nav_Org).WithMany(o => o.Fm_Organizations).HasForeignKey(t => t.ORG_ID); builder.Ignore(t => t.CheckKeys); builder.Ignore(t => t.OrgCheckKeys); builder.Ignore(t => t.SysParams); builder.Ignore(t => t.Nav_SysParams);//.WithOptional().HasForeignKey(t => t.ENTITY_ID).WillCascadeOnDelete(true); } } }