Skip to content

Commit

Permalink
add JSON ExtensionData to forgotten hall data model
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Jan 12, 2024
1 parent b4646cf commit b525502
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,15 @@ public class ForgottenHallAvatar

[JsonPropertyName("element")]
public string Element { get; set; }

/// <summary>
/// 星魂
/// </summary>
[JsonPropertyName("rank")]
public int Rank { get; set; }


[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }
}

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@ public class ForgottenHallFloorDetail

[JsonPropertyName("is_chaos")]
public bool IsChaos { get; set; }

[JsonPropertyName("maze_id")]
public int MazeId { get; set; }

/// <summary>
/// 快速通关
/// </summary>
[JsonPropertyName("is_fast")]
private bool _isFast { get; set; }

/// <summary>
/// 快速通关
/// </summary>
[JsonIgnore]
public bool IsFast
{
get
{
if (_isFast)
{
return true;
}
else if (Node1?.ChallengeTime == Node2?.ChallengeTime)
{
return true;
}
else if (Node1?.Avatars?.Count == 0 || Node2?.Avatars?.Count == 0)
{
return true;
}
else
{
return false;
}
}
}


[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }
}


Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@ public class ForgottenHallInfo

[JsonPropertyName("all_floor_detail")]
public List<ForgottenHallFloorDetail> AllFloorDetail { get; set; }


[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }

}

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ public class ForgottenHallNode

[JsonPropertyName("avatars")]
public List<ForgottenHallAvatar> Avatars { get; set; }


[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }
}


0 comments on commit b525502

Please sign in to comment.