30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace NeonSprawl.Server.Game.Factions;
|
|
|
|
/// <summary>JSON body for <c>GET /game/players/{{id}}/faction-standing</c> (NEO-139).</summary>
|
|
public sealed class FactionStandingSnapshotResponse
|
|
{
|
|
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 catalog faction id. Consumers must treat this as unordered and key rows by <see cref="FactionStandingRowJson.Id"/> — array order is not part of the public contract.</summary>
|
|
[JsonPropertyName("factions")]
|
|
public required IReadOnlyList<FactionStandingRowJson> Factions { get; init; }
|
|
}
|
|
|
|
/// <summary>Current standing for one faction (missing store row reads as neutral <c>0</c>).</summary>
|
|
public sealed class FactionStandingRowJson
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public required string Id { get; init; }
|
|
|
|
[JsonPropertyName("standing")]
|
|
public int Standing { get; init; }
|
|
}
|