mh_lcmk_sms_service/APT.BaseData.Data/Mapping/PF/PFPageCustomMap.cs

23 lines
754 B
C#
Raw Permalink Normal View History

2024-07-12 16:37:09 +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 PFPageCustomMap : APTEntityBaseMap<T_PF_PAGE_CUSTOM>
{
public override void Configure(EntityTypeBuilder<T_PF_PAGE_CUSTOM> builder)
{
base.Configure(builder);
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.COMPONENT_NAME).HasMaxLength(300);
builder.Property(t => t.CUSTOM_PARAMS).HasMaxLength(600);
builder.Property(t => t.CUSTOM_API).HasMaxLength(100);
}
}
}