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

namespace APT.BaseData.Data.Mapping.FM
{
	public class FMWorkStageDetailsMap : APTEntityBaseMap<T_FM_WORKSTAGE_DETAILS>
    {
		public override void Configure(EntityTypeBuilder<T_FM_WORKSTAGE_DETAILS> builder)
		{
			base.Configure(builder);

			builder.HasOne(t => t.Nav_WorkStage).WithMany(t => t.Nav_Details).HasForeignKey(t => t.WORKSTAGE_ID);
			
			builder.HasOne(t => t.Nav_WorkStageChild).WithMany().HasForeignKey(t => t.WORKSTAGE_CHILD_ID);

		} 
    }
}
