Added entity-model mappers

Added and applied field size constants
This commit is contained in:
2026-08-16 10:08:33 +02:00
parent f7b30f89ea
commit 109fa0602e
20 changed files with 350 additions and 31 deletions
@@ -1,3 +1,5 @@
using static PostFundManagement.Domain.Extensions.Constants;
namespace PostFundManagement.Domain.Configuration;
public sealed class Organisation : IEntityTypeConfiguration<Entities.Organisation>
@@ -9,9 +11,9 @@ public sealed class Organisation : IEntityTypeConfiguration<Entities.Organisatio
builder.HasKey(pk => pk.Id);
builder.Property(f => f.CreatedBy).IsRequired();
builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()");
builder.Property(f => f.RegistrationNo).IsRequired().HasMaxLength(256);
builder.Property(f => f.Name).IsRequired().HasMaxLength(256);
builder.Property(f => f.Email).IsRequired().HasMaxLength(256);
builder.Property(f => f.RegistrationNo).IsRequired().HasMaxLength(LabelLength);
builder.Property(f => f.Name).IsRequired().HasMaxLength(LabelLength);
builder.Property(f => f.Email).IsRequired().HasMaxLength(LabelLength);
builder.Property(f => f.Type).IsRequired().HasConversion<int>().HasDefaultValueSql("5");
builder.Property(f => f.Status).IsRequired().HasConversion<int>().HasDefaultValueSql("1");