Stable run using Multi tenancy across entire estate
Audit logging and error logging active
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
|
||||
[EntityTypeConfiguration<TenantUserConfiguration, TenantUser>]
|
||||
public class TenantUser : Models.TenantUser
|
||||
{
|
||||
public virtual Tenant? Tenant { get; set; }
|
||||
@@ -17,9 +18,7 @@ public sealed class TenantUserConfiguration : IEntityTypeConfiguration<TenantUse
|
||||
{
|
||||
builder.ToTable(nameof(TenantUser).Pluralize());
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.HasIndex(tu => new { tu.TenantId, tu.UserId }).IsUnique();
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()");
|
||||
builder.Property(f => f.CreatedBy).IsRequired();
|
||||
builder.Property(f => f.UserId).IsRequired();
|
||||
|
||||
Reference in New Issue
Block a user