Implemented centralised audit logging
This commit is contained in:
@@ -9,6 +9,8 @@ public class Award : Models.Award
|
||||
|
||||
public virtual User? Approver { get; set; }
|
||||
|
||||
public virtual Tenant? Tenant { get; set; }
|
||||
|
||||
public virtual Organisation? Organisation { get; set; }
|
||||
|
||||
public virtual Programme? Programme { get; set; }
|
||||
@@ -27,6 +29,7 @@ public sealed class AwardConfiguration : IEntityTypeConfiguration<Award>
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.OrganisationId).IsRequired();
|
||||
builder.Property(f => f.ProgrammeId).IsRequired();
|
||||
builder.Property(f => f.TenantId).IsRequired();
|
||||
builder.Property(f => f.ProjectId).IsRequired(false);
|
||||
builder.Property(f => f.CreatedBy).IsRequired();
|
||||
builder.Property(f => f.UpdatedBy).IsRequired(false);
|
||||
@@ -37,6 +40,12 @@ public sealed class AwardConfiguration : IEntityTypeConfiguration<Award>
|
||||
.HasSentinel(ApprovalStatus.Pending);
|
||||
builder.Property(f => f.Amount).IsRequired().HasPrecision(18, 2);
|
||||
|
||||
builder.HasOne(f => f.Tenant)
|
||||
.WithMany()
|
||||
.HasForeignKey(fk => fk.TenantId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
builder.HasOne(f => f.Organisation)
|
||||
.WithMany()
|
||||
.HasForeignKey(fk => fk.OrganisationId)
|
||||
|
||||
Reference in New Issue
Block a user