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

31 lines
1.3 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 PFPageTreeMap : APTEntityBaseMap<T_PF_PAGE_TREE>
{
public override void Configure(EntityTypeBuilder<T_PF_PAGE_TREE> builder)
{
base.Configure(builder);
builder.Property(t => t.LABEL_NAME).HasMaxLength(200);
builder.Property(t => t.QUERY_API_URL).HasMaxLength(200);
builder.Property(t => t.BATCH_DEL_API_URL).HasMaxLength(200);
//builder.Property(t => t.PICTURE_CODE).HasMaxLength(600);
builder.Property(t => t.SELECT_CONDITION).HasMaxLength(600);
builder.Property(t => t.SORT).HasMaxLength(50);
builder.Property(t => t.TREE_SELECTED_PARAM).HasMaxLength(50);
builder.HasMany(t => t.Nav_Columns).
WithOne(t => t.Nav_PageTree).HasForeignKey(i => i.PAGE_TREE_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_PageForm).
WithMany().HasForeignKey(t => t.PAGE_FORM_ID).OnDelete(DeleteBehavior.Restrict);
builder.Property(t => t.CODE).HasMaxLength(100);
builder.Property(t => t.RELATION_FIELD).HasMaxLength(200);
builder.Property(t => t.TREE_SELECTED_PARAM).HasMaxLength(200);
builder.Property(t => t.CUSTOM_PARAMS).HasMaxLength(600);
}
}
}