using APT.BaseData.Domain.Entities; using APT.Infrastructure.EF.Map; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace APT.BaseData.Data.Mapping { public class PFClientMenuMap : TreeEntityBaseMap { public override void Configure(EntityTypeBuilder builder) { base.Configure(builder); // Properties builder.Property(t =>t.NAME) .HasMaxLength(50); builder.Property(t => t.NAME_ACRONYM).HasMaxLength(100); builder.Property(t => t.MENU_FORM_PARAMS) .HasMaxLength(300); builder.Property(t => t.IMG) .HasMaxLength(50); builder.Property(t => t.ICON) .HasMaxLength(50); builder.Property(t => t.NUM); builder.HasOne(t => t.Nav_MenuForm).WithMany().HasForeignKey(t => t.MENU_FORM_ID).OnDelete(DeleteBehavior.Restrict); builder.Ignore(t => t.VIRTUAL_URL); builder.Property(t => t.REMARK).HasMaxLength(400); } } }