Implemented centralised audit logging
This commit is contained in:
@@ -8,6 +8,8 @@ public class Programme : Models.Programme
|
||||
public virtual User? Creator { get; set; }
|
||||
|
||||
public virtual User? Owner { get; set; }
|
||||
|
||||
public virtual Tenant? Tenant { get; set; }
|
||||
|
||||
public virtual Portfolio? Portfolio { get; set; }
|
||||
|
||||
@@ -27,6 +29,7 @@ public sealed class ProgrammeConfiguration : IEntityTypeConfiguration<Programme>
|
||||
builder.ToTable(nameof(Programme).Pluralize());
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.TenantId).IsRequired();
|
||||
builder.Property(f => f.PortfolioId).IsRequired();
|
||||
builder.Property(f => f.OwnedBy).IsRequired();
|
||||
builder.Property(f => f.CreatedBy).IsRequired();
|
||||
@@ -37,6 +40,12 @@ public sealed class ProgrammeConfiguration : IEntityTypeConfiguration<Programme>
|
||||
builder.Property(f => f.Status).IsRequired().HasConversion<int>().HasDefaultValueSql("1")
|
||||
.HasSentinel(ApprovalStatus.Pending);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.NoAction);
|
||||
|
||||
builder.HasOne(f => f.Portfolio)
|
||||
.WithMany(f => f.Programmes)
|
||||
.HasForeignKey(fk => fk.PortfolioId)
|
||||
|
||||
Reference in New Issue
Block a user