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

namespace APT.BaseData.Data.Mapping.FM
{
	public class FMNotificationMap : APTEntityBaseMap<T_FM_NOTIFICATION>
	{
		public override void Configure(EntityTypeBuilder<T_FM_NOTIFICATION> builder)
		{
			base.Configure(builder);
			builder.Property(t => t.TITLE).HasMaxLength(200);
			builder.Property(t => t.ECMSAGE).HasMaxLength(1000);
			builder.Property(t => t.REMARK).HasMaxLength(600);
			builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict); 
        } 
	}
}
