Stable run using Multi tenancy across entire estate

Audit logging and error logging active
This commit is contained in:
2026-09-24 12:00:47 +02:00
parent 8e0c099867
commit 020bdee36f
40 changed files with 11004 additions and 394 deletions
@@ -1,8 +1,8 @@
using PostFundManagement.Domain.Models;
using static PostFundManagement.Domain.Extensions.Constants;
namespace PostFundManagement.Domain.Entities;
[EntityTypeConfiguration<AuditLogConfiguration, AuditLog>]
public sealed class AuditLog : Models.AuditLog;
public sealed class AuditLogConfiguration : IEntityTypeConfiguration<AuditLog>
@@ -16,9 +16,7 @@ public sealed class AuditLogConfiguration : IEntityTypeConfiguration<AuditLog>
builder.Property(f => f.EntityName).IsRequired().HasMaxLength(LabelLength);
builder.Property(f => f.EntityId).IsRequired();
builder.Property(f => f.Action).IsRequired().HasMaxLength(ShortLabelLength);
builder.Property(f => f.Changes).IsRequired(false).HasColumnType("jsonb")
.HasConversion(model => JsonSerializer.Serialize(model, JsonSerializerOptions.Default),
provider => JsonSerializer.Deserialize<AuditChanges>(provider, JsonSerializerOptions.Default));
builder.Property(f => f.Changes).IsRequired(false);
builder.Property(f => f.PerformedBy).IsRequired();
builder.Property(f => f.Timestamp).IsRequired().HasDefaultValueSql("now()");
}