Change to static skin catalog population
This commit is contained in:
21
BlueLaminate/BlueLaminate.EFCore/Entities/Collection.cs
Normal file
21
BlueLaminate/BlueLaminate.EFCore/Entities/Collection.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace BlueLaminate.EFCore.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// A source a skin originates from: either an in-game collection (e.g.
|
||||
/// "The Dead Hand Collection") or a container/case (e.g. "Glove Case").
|
||||
/// </summary>
|
||||
public class Collection
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <summary>Stable id from the CSGO-API catalogue, e.g. "collection-set-community-37"
|
||||
/// or "crate-4288". The natural key.</summary>
|
||||
public string Slug { get; set; } = null!;
|
||||
|
||||
/// <summary>"Collection" or "Container".</summary>
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
public ICollection<Skin> Skins { get; set; } = new List<Skin>();
|
||||
}
|
||||
@@ -6,17 +6,29 @@ public class Skin
|
||||
public int WeaponId { get; set; }
|
||||
public Weapon Weapon { get; set; } = null!;
|
||||
|
||||
/// <summary>Stable id from the CSGO-API catalogue, e.g. "skin-e757fd7191f9". The natural key.</summary>
|
||||
public string Slug { get; set; } = null!;
|
||||
|
||||
public string Name { get; set; } = null!;
|
||||
public string Rarity { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
public decimal FloatMin { get; set; }
|
||||
public decimal FloatMax { get; set; }
|
||||
public bool StatTrakAvailable { get; set; }
|
||||
public bool SouvenirAvailable { get; set; }
|
||||
|
||||
// Computed in the database: float_min = 0.0 AND float_max = 1.0.
|
||||
// A skin with a capped float range behaves differently in tradeup calculations.
|
||||
public bool TrueFloat { get; private set; }
|
||||
/// <summary>Every collection and container this skin originates from.</summary>
|
||||
public ICollection<Collection> Collections { get; set; } = new List<Collection>();
|
||||
|
||||
// Null when the catalogue gives no wear range (e.g. vanilla knives). Callers
|
||||
// must treat null as "unknown", not as a full 0.0–1.0 range.
|
||||
public decimal? FloatMin { get; set; }
|
||||
public decimal? FloatMax { get; set; }
|
||||
|
||||
// Computed in the database: float_min = 0.0 AND float_max = 1.0; null while the
|
||||
// bounds are unknown. A skin with a capped float range behaves differently in
|
||||
// tradeup calculations.
|
||||
public bool? TrueFloat { get; private set; }
|
||||
|
||||
public ICollection<SkinCondition> Conditions { get; set; } = new List<SkinCondition>();
|
||||
public ICollection<SkinInstance> Instances { get; set; } = new List<SkinInstance>();
|
||||
|
||||
Reference in New Issue
Block a user