using FindAndDrive.Domain.Models.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace FindAndDrive.Persistence.EntityConfigurations { internal class ApplicantFraudAlertConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasKey(k => k.ApplicantFraudAlertId); //Set Decimal columns' precision builder.Property(x => x.Disparity).HasPrecision(18, 2); //Specify max length on string fields only //builder.Property(p => p.Title).HasMaxLength(5); builder.Property(p => p.RatingDescription).HasMaxLength(50); builder.Property(p => p.DisparityDescription).HasMaxLength(50); } } }