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 Instrument : IEntityTypeConfiguration<Entities.Instrument>
|
||||
@@ -7,9 +9,9 @@ public sealed class Instrument : IEntityTypeConfiguration<Entities.Instrument>
|
||||
builder.ToTable(nameof(Entities.Instrument).Pluralize());
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.Code).IsRequired().HasMaxLength(50);
|
||||
builder.Property(f => f.Name).IsRequired().HasMaxLength(256);
|
||||
builder.Property(f => f.Description).IsRequired(false).HasMaxLength(1024);
|
||||
builder.Property(f => f.Code).IsRequired().HasMaxLength(ShortLabelLength);
|
||||
builder.Property(f => f.Name).IsRequired().HasMaxLength(LabelLength);
|
||||
builder.Property(f => f.Description).IsRequired(false).HasMaxLength(TextLength);
|
||||
builder.Property(f => f.Status).IsRequired().HasConversion<int>().HasDefaultValueSql("2");
|
||||
builder.Property(f => f.CreatedBy).IsRequired();
|
||||
builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()");
|
||||
|
||||
Reference in New Issue
Block a user