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

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

			builder.Property(t => t.FIELD_NAME).HasMaxLength(100);
			builder.Property(t => t.VALUE).HasMaxLength(100);
			builder.HasOne(t => t.Nav_EditColumn).WithMany(t => t.Nav_Filters).HasForeignKey(t => t.EDIT_COLUMN_ID).OnDelete(DeleteBehavior.Restrict);
			 
		} 
	}
}
