24 lines
		
	
	
		
			793 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			793 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 FMHolidayMap : APTEntityBaseMap<T_FM_HOLIDAY>
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
										public override void Configure(EntityTypeBuilder<T_FM_HOLIDAY> builder)
							 | 
						|||
| 
								 | 
							
										{
							 | 
						|||
| 
								 | 
							
											base.Configure(builder);
							 | 
						|||
| 
								 | 
							
											// Properties
							 | 
						|||
| 
								 | 
							
											builder.Property(t => t.NAME).HasMaxLength(50);
							 | 
						|||
| 
								 | 
							
											builder.Property(t => t.CODE).HasMaxLength(50);
							 | 
						|||
| 
								 | 
							
											builder.Property(t => t.REMARK).HasMaxLength(200);
							 | 
						|||
| 
								 | 
							
								            builder.Property(t => t.NAME_ACRONYM).HasMaxLength(100);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								            //relation
							 | 
						|||
| 
								 | 
							
								            builder.HasMany(t => t.Nav_HolidayDetails).WithOne().HasForeignKey(t => t.HOLIDAY_ID).OnDelete(DeleteBehavior.Restrict);
							 | 
						|||
| 
								 | 
							
										} 
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |