mh_sms/APT.BaseData.Data/Mapping/PF/PFClientMenuMap.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2024-04-12 16:50:28 +08:00
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<T_PF_CLIENT_MENU>
{
public override void Configure(EntityTypeBuilder<T_PF_CLIENT_MENU> 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);
}
}
}