mh_sms/APT.BaseData.Data/Mapping/PF/PFAppMenuMap.cs
2024-04-12 16:50:28 +08:00

40 lines
1.1 KiB
C#

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 PFAppMenuMap : TreeEntityBaseMap<T_PF_APPMENU>
{
public override void Configure(EntityTypeBuilder<T_PF_APPMENU> builder)
{
base.Configure(builder);
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.HasOne(t => t.Nav_Picture).
WithMany().HasForeignKey(t => t.PICTURE_ID).OnDelete(DeleteBehavior.Restrict);
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);
}
}
}