mh_frame_sps/APT.Infrastructure.EF/Map/FMOrganizationMap.cs

23 lines
1009 B
C#
Raw Normal View History

2026-04-07 13:47:52 +08:00
using APT.Infrastructure.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace APT.Infrastructure.EF.Map
{
public class FMOrganizationMap : TreeEntityBaseMap<T_FM_ORGANIZATION>
{
public void Configure(EntityTypeBuilder<T_FM_ORGANIZATION> 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);
}
}
}