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

namespace ATP.BaseData.Data.Mapping.FM
{
	public class FMProcessMap : APTEntityBaseMap<T_FM_PROCESS>
	{
		public override void Configure(EntityTypeBuilder<T_FM_PROCESS> builder)
		{
			base.Configure(builder);
			builder.Property(t => t.CODE).HasMaxLength(30);
			builder.Property(t => t.NAME).HasMaxLength(100);
            builder.Property(t => t.NAME_ACRONYM).HasMaxLength(200);
            builder.Property(t => t.REMARK).HasMaxLength(500);
			builder.HasOne(t => t.Nav_FQCWorkStage).WithMany().HasForeignKey(t => t.FQC_WORKSTAGE_ID);
			builder.HasOne(t => t.Nav_PQCWorkStage).WithMany().HasForeignKey(t => t.PQC_WORKSTAGE_ID);
		} 
	}
}
