add csfloat api usage
This commit is contained in:
@@ -21,6 +21,18 @@ public class SkinConfiguration : IEntityTypeConfiguration<Skin>
|
||||
// Slug is the natural key the sync upserts against.
|
||||
entity.HasIndex(e => e.Slug).IsUnique();
|
||||
|
||||
// Market listings join back to a skin by (def_index, paint_index). Unique
|
||||
// among populated rows; filtered so the many catalogue rows that predate
|
||||
// these columns (null) don't collide. Postgres treats nulls as distinct
|
||||
// anyway, but the filter makes the intent explicit and the index smaller.
|
||||
entity.HasIndex(e => new { e.DefIndex, e.PaintIndex })
|
||||
.IsUnique()
|
||||
.HasFilter("def_index IS NOT NULL AND paint_index IS NOT NULL");
|
||||
|
||||
// The catalogue sweep orders skins by when they were last swept (nulls
|
||||
// first) to resume across capped runs; index that ordering.
|
||||
entity.HasIndex(e => e.ListingsSweptAt);
|
||||
|
||||
entity.HasOne(e => e.Weapon)
|
||||
.WithMany(w => w.Skins)
|
||||
.HasForeignKey(e => e.WeaponId);
|
||||
|
||||
Reference in New Issue
Block a user