mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-25 07:38:17 +03:00
18 lines
726 B
C#
18 lines
726 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace AMNet.Server;
|
|
|
|
public record SystemState(
|
|
[property: JsonPropertyName("apiVersion")] int ApiVersion,
|
|
[property: JsonPropertyName("gameId")] string GameId,
|
|
[property: JsonPropertyName("serverName")] string ServerName,
|
|
[property: JsonPropertyName("sessionUptime")] long SessionUptime,
|
|
[property: JsonPropertyName("timeSinceLastPoll")] long? TimeSinceLastPoll);
|
|
|
|
public record CardReadRequest(
|
|
[property: JsonPropertyName("cardId")] string MatrixCode);
|
|
|
|
[JsonSerializable(typeof(SystemState))]
|
|
[JsonSerializable(typeof(CardReadRequest))]
|
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
public partial class SerializerContext : JsonSerializerContext; |