33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace NeonSprawl.Server.Game.Skills;
|
|
|
|
/// <summary>JSON body for <c>GET /game/players/{{id}}/skill-progression</c> (NEO-37).</summary>
|
|
public sealed class SkillProgressionSnapshotResponse
|
|
{
|
|
public const int CurrentSchemaVersion = 1;
|
|
|
|
[JsonPropertyName("schemaVersion")]
|
|
public int SchemaVersion { get; init; } = CurrentSchemaVersion;
|
|
|
|
[JsonPropertyName("playerId")]
|
|
public required string PlayerId { get; init; }
|
|
|
|
/// <summary>One row per registered skill, ordered by stable <c>id</c> (ordinal).</summary>
|
|
[JsonPropertyName("skills")]
|
|
public required IReadOnlyList<SkillProgressionRowJson> Skills { get; init; }
|
|
}
|
|
|
|
/// <summary>XP and level for one skill before grants (defaults) or after NEO-38 persistence.</summary>
|
|
public sealed class SkillProgressionRowJson
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public required string Id { get; init; }
|
|
|
|
[JsonPropertyName("xp")]
|
|
public int Xp { get; init; }
|
|
|
|
[JsonPropertyName("level")]
|
|
public int Level { get; init; }
|
|
}
|