mh_sms/APT.BaseData.Data/Mapping/FM/FMWareHouseMap.cs

21 lines
682 B
C#
Raw Permalink Normal View History

2024-04-12 16:50:28 +08:00
using APT.Infrastructure.EF.Map;
using APT.BaseData.Domain.Entities.FM;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace APT.BaseData.Data.Mapping.FM
{
public class FMWarehouseMap: APTEntityBaseMap<T_FM_WAREHOUSE>
{
public override void Configure(EntityTypeBuilder<T_FM_WAREHOUSE> builder)
{
base.Configure(builder);
builder.Property(t => t.CODE).HasMaxLength(100);
builder.Property(t => t.NAME).HasMaxLength(100);
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(200);
builder.Property(t => t.REMARK).HasMaxLength(400);
builder.HasOne(o => o.Parent).WithMany().HasForeignKey(o => o.Parent_ID);
}
}
}