using APT.Infrastructure.EF.Map;
using APT.BaseData.Domain.Entities.FM;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace APT.BaseData.Data.Mapping.FM
{
	public class FMWorkStageManuResourceMap : APTEntityBaseMap<T_FM_WORKSTAGE_MANU_RESOURCE>
	{
		public override void Configure(EntityTypeBuilder<T_FM_WORKSTAGE_MANU_RESOURCE> builder)
		{
			base.Configure(builder);
			builder.HasOne(t => t.Nav_ManuResource).WithMany().HasForeignKey(t => t.MANU_RESOURCE_ID);
			builder.HasOne(t => t.Nav_Workstage).WithMany(t => t.Nav_ManuResources).HasForeignKey(t => t.WORKSTAGE_ID);
		} 
	}
}
