24 lines
		
	
	
		
			681 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			681 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| 
								 | 
							
								using APT.BaseData.Domain.Entities.Platform;
							 | 
						|||
| 
								 | 
							
								using APT.Infrastructure.EF.Map;
							 | 
						|||
| 
								 | 
							
								using Microsoft.EntityFrameworkCore;
							 | 
						|||
| 
								 | 
							
								using Microsoft.EntityFrameworkCore.Metadata.Builders;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								namespace APT.BaseData.Data.Mapping.Platform
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
									public class PFDefectCodeMap : TreeEntityBaseMap<T_PF_DEFECT_CODE>
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
										public override void Configure(EntityTypeBuilder<T_PF_DEFECT_CODE> builder)
							 | 
						|||
| 
								 | 
							
										{
							 | 
						|||
| 
								 | 
							
											base.Configure(builder);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
											builder.Property(t => t.CODE)
							 | 
						|||
| 
								 | 
							
											 .HasMaxLength(20);
							 | 
						|||
| 
								 | 
							
											builder.Property(t => t.NAME)
							 | 
						|||
| 
								 | 
							
											 .HasMaxLength(20); 
							 | 
						|||
| 
								 | 
							
											builder.HasOne(t => t.Nav_DefectGrade).WithMany(t => t.Nav_DefectCodes).HasForeignKey(t => t.BAD_GRADE_ID).OnDelete(DeleteBehavior.Restrict);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
										}
							 | 
						|||
| 
								 | 
							
										 
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |