Added entity-model mappers
Added and applied field size constants
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using static PostFundManagement.Domain.Extensions.Constants;
|
||||
|
||||
namespace PostFundManagement.Domain.Configuration;
|
||||
|
||||
public sealed class AuditLog : IEntityTypeConfiguration<Entities.AuditLog>
|
||||
@@ -7,9 +9,9 @@ public sealed class AuditLog : IEntityTypeConfiguration<Entities.AuditLog>
|
||||
builder.ToTable(nameof(Entities.AuditLog).Pluralize());
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.EntityName).IsRequired().HasMaxLength(128);
|
||||
builder.Property(f => f.EntityName).IsRequired().HasMaxLength(LabelLength);
|
||||
builder.Property(f => f.EntityId).IsRequired();
|
||||
builder.Property(f => f.Action).IsRequired().HasMaxLength(64);
|
||||
builder.Property(f => f.Action).IsRequired().HasMaxLength(ShortLabelLength);
|
||||
builder.Property(f => f.Changes).IsRequired(false).HasColumnType("jsonb");
|
||||
builder.Property(f => f.PerformedBy).IsRequired();
|
||||
builder.Property(f => f.Timestamp).IsRequired().HasDefaultValueSql("now()");
|
||||
|
||||
Reference in New Issue
Block a user