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

namespace APT.BaseData.Data.Mapping.FM
{
	public class FMNotificationAcceptedMap : APTEntityBaseMap<T_FM_NOTIFICATION_ACCEPTED>
	{
		public override void Configure(EntityTypeBuilder<T_FM_NOTIFICATION_ACCEPTED> builder)
		{
			base.Configure(builder);
			builder.HasOne(t => t.Nav_Notification).
					WithMany(t => t.Nav_Accepteds).HasForeignKey(t => t.NOTIFICATION_ID).OnDelete(DeleteBehavior.Restrict);
		} 
	}
}
