
using APT.Infrastructure.EF.Map;
using APT.BaseData.Domain.Entities.FM;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace APT.BaseData.Data.Mapping.FM
{
	public class FMPanelMap : APTEntityBaseMap<T_FM_PANEL>
    {
		public override void Configure(EntityTypeBuilder<T_FM_PANEL> builder)
		{
			base.Configure(builder);
			builder.Property(t => t.CODE).HasMaxLength(30);
			builder.Property(t => t.NAME).HasMaxLength(30);
            builder.Property(t => t.NAME_ACRONYM).HasMaxLength(60);
            //relation
            builder.HasMany(t => t.Nav_PanelInfo).WithOne()
				.HasForeignKey(t => t.PANEL_ID);
		} 
    }
}