-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ArenaRanking.Avatar optional on query
- Loading branch information
Showing
3 changed files
with
89 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
using System.Text.Json.Serialization; | ||
using NineChroniclesUtilBackend.Models.Agent; | ||
|
||
namespace NineChroniclesUtilBackend.Models.Arena; | ||
|
||
public class ArenaRanking( | ||
string AvatarAddress, | ||
string ArenaAddress, | ||
int Cp, | ||
int Win, | ||
int Lose, | ||
long Rank, | ||
int Ticket, | ||
int TicketResetCount, | ||
int PurchasedTicketCount, | ||
int Score, | ||
Avatar Avatar | ||
int Score | ||
) | ||
{ | ||
public string AvatarAddress { get; set; } = AvatarAddress; | ||
public string ArenaAddress { get; set; } = ArenaAddress; | ||
public int Cp { get; set; } = Cp; | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public int? CP { get; set; } | ||
public int Win { get; set; } = Win; | ||
public int Lose { get; set; } = Lose; | ||
public long Rank { get; set; } = Rank; | ||
public int Ticket { get; set; } = Ticket; | ||
public int TicketResetCount { get; set; } = TicketResetCount; | ||
public int PurchasedTicketCount { get; set; } = PurchasedTicketCount; | ||
public int Score { get; set; } = Score; | ||
public Avatar Avatar { get; set; } = Avatar; | ||
|
||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public Avatar? Avatar { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters