21 lines
		
	
	
		
			686 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			686 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| 
								 | 
							
								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 FMCalendarClassMap : APTEntityBaseMap<T_FM_CALENDAR_CLASS>
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
										public override void Configure(EntityTypeBuilder<T_FM_CALENDAR_CLASS> builder)
							 | 
						|||
| 
								 | 
							
										{
							 | 
						|||
| 
								 | 
							
											base.Configure(builder);
							 | 
						|||
| 
								 | 
							
											builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
											//关系
							 | 
						|||
| 
								 | 
							
											builder.HasOne(t => t.Nav_Calendar).WithMany(t => t.Nav_CalendarClass).HasForeignKey(t => t.CALENDAR_ID).OnDelete(DeleteBehavior.Restrict);
							 | 
						|||
| 
								 | 
							
										}
							 | 
						|||
| 
								 | 
							
										 
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |