using System; using System.Collections.Generic; using System.Text.Json.Serialization; namespace TownOfUsStatsExporter.Models; /// /// Main data structure for game statistics export. /// public class GameStatsData { /// /// Gets or sets the API authentication token. /// [JsonPropertyName("token")] public string Token { get; set; } = string.Empty; /// /// Gets or sets the optional secret for additional authentication. /// [JsonPropertyName("secret")] public string? Secret { get; set; } /// /// Gets or sets the game information. /// [JsonPropertyName("gameInfo")] public GameInfoData GameInfo { get; set; } = new(); /// /// Gets or sets the list of player data. /// [JsonPropertyName("players")] public List Players { get; set; } = new(); /// /// Gets or sets the game result. /// [JsonPropertyName("gameResult")] public GameResultData GameResult { get; set; } = new(); } /// /// Game session information. /// public class GameInfoData { /// /// Gets or sets the unique game ID. /// [JsonPropertyName("gameId")] public string GameId { get; set; } = string.Empty; /// /// Gets or sets the game timestamp. /// [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Gets or sets the lobby code. /// [JsonPropertyName("lobbyCode")] public string LobbyCode { get; set; } = string.Empty; /// /// Gets or sets the game mode. /// [JsonPropertyName("gameMode")] public string GameMode { get; set; } = string.Empty; /// /// Gets or sets the game duration in seconds. /// [JsonPropertyName("duration")] public float Duration { get; set; } /// /// Gets or sets the map name. /// [JsonPropertyName("map")] public string Map { get; set; } = string.Empty; } /// /// Individual player export data. /// public class PlayerExportData { /// /// Gets or sets the player ID. /// [JsonPropertyName("playerId")] public int PlayerId { get; set; } /// /// Gets or sets the player name. /// [JsonPropertyName("playerName")] public string PlayerName { get; set; } = string.Empty; /// /// Gets or sets the player tag (friend code). /// [JsonPropertyName("playerTag")] public string? PlayerTag { get; set; } /// /// Gets or sets the player platform. /// [JsonPropertyName("platform")] public string Platform { get; set; } = "Unknown"; /// /// Gets or sets the player's final role. /// [JsonPropertyName("role")] public string Role { get; set; } = string.Empty; /// /// Gets or sets the list of all roles the player had during the game. /// [JsonPropertyName("roles")] public List Roles { get; set; } = new(); /// /// Gets or sets the list of modifiers the player had. /// [JsonPropertyName("modifiers")] public List Modifiers { get; set; } = new(); /// /// Gets or sets a value indicating whether the player won. /// [JsonPropertyName("isWinner")] public bool IsWinner { get; set; } /// /// Gets or sets the player statistics. /// [JsonPropertyName("stats")] public PlayerStatsNumbers Stats { get; set; } = new(); } /// /// Numeric statistics for a player. /// public class PlayerStatsNumbers { /// /// Gets or sets the total number of tasks. /// [JsonPropertyName("totalTasks")] public int TotalTasks { get; set; } /// /// Gets or sets the number of completed tasks. /// [JsonPropertyName("tasksCompleted")] public int TasksCompleted { get; set; } /// /// Gets or sets the total number of kills. /// [JsonPropertyName("kills")] public int Kills { get; set; } /// /// Gets or sets the number of correct kills. /// [JsonPropertyName("correctKills")] public int CorrectKills { get; set; } /// /// Gets or sets the number of incorrect kills. /// [JsonPropertyName("incorrectKills")] public int IncorrectKills { get; set; } /// /// Gets or sets the number of correct assassin kills. /// [JsonPropertyName("correctAssassinKills")] public int CorrectAssassinKills { get; set; } /// /// Gets or sets the number of incorrect assassin kills. /// [JsonPropertyName("incorrectAssassinKills")] public int IncorrectAssassinKills { get; set; } } /// /// Game result data. /// public class GameResultData { /// /// Gets or sets the winning team name. /// [JsonPropertyName("winningTeam")] public string WinningTeam { get; set; } = "Unknown"; }