Implemented audit logging and automated logging
This commit is contained in:
@@ -41,7 +41,7 @@ public sealed class AwardConfiguration : IEntityTypeConfiguration<Award>
|
||||
builder.Property(f => f.Amount).IsRequired().HasPrecision(18, 2);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.WithMany(f => f.Awards)
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
@@ -32,7 +32,7 @@ public sealed class PortfolioConfiguration : IEntityTypeConfiguration<Portfolio>
|
||||
builder.Property(f => f.Description).IsRequired(false).HasMaxLength(TextLength);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.WithMany(f => f.Portfolios)
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed class ProgrammeConfiguration : IEntityTypeConfiguration<Programme>
|
||||
.HasSentinel(ApprovalStatus.Pending);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.WithMany(f => f.Programmes)
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.NoAction);
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed class ProjectConfiguration : IEntityTypeConfiguration<Project>
|
||||
.HasSentinel(ApprovalStatus.Pending);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.WithMany(f => f.Projects)
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
@@ -8,6 +8,14 @@ public class Tenant : Models.Tenant
|
||||
public virtual User? Creator { get; set; }
|
||||
|
||||
public virtual User? Updator { get; set; }
|
||||
|
||||
public ICollection<Award> Awards { get; set; } = [];
|
||||
|
||||
public ICollection<Project> Projects { get; set; } = [];
|
||||
|
||||
public ICollection<Programme> Programmes { get; set; } = [];
|
||||
|
||||
public ICollection<Portfolio> Portfolios { get; set; } = [];
|
||||
}
|
||||
|
||||
public sealed class TenantConfiguration : IEntityTypeConfiguration<Tenant>
|
||||
|
||||
Reference in New Issue
Block a user