forked from gongxuegit/tiku-backend.net
feat: add auth and tenant operations persistence
This commit is contained in:
@@ -49,6 +49,11 @@ internal sealed class TenantMembershipConfiguration : IEntityTypeConfiguration<T
|
||||
.WithMany()
|
||||
.HasForeignKey(entity => entity.UserId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
builder.HasOne<TenantRoleTemplate>()
|
||||
.WithMany()
|
||||
.HasForeignKey(entity => new { entity.TenantId, entity.RoleTemplateId })
|
||||
.HasPrincipalKey(entity => new { entity.TenantId, entity.Id })
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user