Stable multitenancy
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using PostFundManagement.Domain.Abstractions;
|
||||
using static PostFundManagement.Domain.Extensions.Constants;
|
||||
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
|
||||
[EntityTypeConfiguration<ProgrammeConfiguration, Programme>]
|
||||
public class Programme : Models.Programme
|
||||
public class Programme : Models.Programme, ITenantEntity
|
||||
{
|
||||
public virtual User? Creator { get; set; }
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed class ProgrammeConfiguration : IEntityTypeConfiguration<Programme>
|
||||
.HasSentinel(ApprovalStatus.Pending);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany(f => f.Programmes)
|
||||
.WithMany()
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.NoAction);
|
||||
|
||||
Reference in New Issue
Block a user