using BlueLaminate.EFCore.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace BlueLaminate.EFCore.Configurations; public class SkinConditionConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder entity) { entity.Property(e => e.MinFloat).HasColumnType("numeric(10,9)"); entity.Property(e => e.MaxFloat).HasColumnType("numeric(10,9)"); // The catalogue sweep orders bands by this (never-swept first, then stalest), // so index it like the equivalent column on skins. entity.HasIndex(e => e.ListingsSweptAt); entity.HasOne(e => e.Skin) .WithMany(s => s.Conditions) .HasForeignKey(e => e.SkinId); } }