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 User : IEntityTypeConfiguration<Entities.User>
|
||||
@@ -7,7 +9,7 @@ public sealed class User : IEntityTypeConfiguration<Entities.User>
|
||||
builder.ToTable(nameof(Entities.User).Pluralize());
|
||||
|
||||
builder.HasKey(pk => pk.Id);
|
||||
builder.Property(f => f.Email).IsRequired().HasMaxLength(256);
|
||||
builder.Property(f => f.Email).IsRequired().HasMaxLength(LabelLength);
|
||||
builder.Property(f => f.Status).IsRequired().HasConversion<int>().HasDefaultValueSql("2");
|
||||
builder.Property(f => f.LastLoginAt).IsRequired(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user