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 FMUserCCEditHColMap : APTEntityBaseMap<T_FM_USER_C_C_EDIT_H_COL>
	{
		public override void Configure(EntityTypeBuilder<T_FM_USER_C_C_EDIT_H_COL> builder)
		{
			base.Configure(builder);
			builder.HasOne(t => t.Nav_EditColumn).WithMany().HasForeignKey(t => t.EDIT_COLUMN_ID).OnDelete(DeleteBehavior.Restrict);
			builder.HasOne(t => t.Nav_UserCCEdit).WithMany(t => t.Nav_HiddenCols).HasForeignKey(t => t.USER_C_C_EDIT_ID).OnDelete(DeleteBehavior.Restrict);
		} 
	}
}
