39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
using IRaCIS.Core.Domain.Models;
 | 
						|
using Microsoft.EntityFrameworkCore;
 | 
						|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
 | 
						|
 | 
						|
 | 
						|
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
 | 
						|
{
 | 
						|
    public class TrialDocUserTypeConfirmConfigration : IEntityTypeConfiguration<TrialDocNeedConfirmedUserType>
 | 
						|
    {
 | 
						|
       
 | 
						|
 | 
						|
        public void Configure(EntityTypeBuilder<TrialDocNeedConfirmedUserType> builder)
 | 
						|
        {
 | 
						|
            ////项目文档 需要确认的用户类型 找到项目下对应用户类型的用户  用UserTypeId 关联
 | 
						|
            //builder
 | 
						|
            //    .HasMany(dd => dd.TrialUserList)
 | 
						|
            //    .WithOne(d => d.TrialDocNeedConfirmedUserType)
 | 
						|
            //    .HasForeignKey(s => new {/* s.TrialId,*/ s.User.UserTypeId })
 | 
						|
            //    .HasPrincipalKey(c => new { /*c.TrialDocument.TrialId,*/ c.NeedConfirmUserTypeId });
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialDocConfirmUserConfigration : IEntityTypeConfiguration<TrialDocUserTypeConfirmedUser>
 | 
						|
    {
 | 
						|
 | 
						|
 | 
						|
        public void Configure(EntityTypeBuilder<TrialDocUserTypeConfirmedUser> builder)
 | 
						|
        {
 | 
						|
 | 
						|
 | 
						|
            //builder
 | 
						|
            //    .HasOne(dd => dd.TrialUser)
 | 
						|
            //    .WithMany(d => d.TrialDocUserConfirmedList)
 | 
						|
            //    .HasForeignKey(s => new { s.TrialDocument.TrialId, s.ConfirmUserId })
 | 
						|
            //    .HasPrincipalKey(c => new { c.TrialId, c.UserId });
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |