Stable run using Multi tenancy across entire estate
Audit logging and error logging active
This commit is contained in:
@@ -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()");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user