-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add json extension data to all data model
- Loading branch information
Showing
29 changed files
with
201 additions
and
91 deletions.
There are no files selected for viewing
32 changes: 17 additions & 15 deletions
32
src/Starward.Core/GameRecord/Genshin/SpiralAbyss/SpiralAbyssAvatar.cs
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,28 +1,30 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss | ||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss; | ||
|
||
/// <summary> | ||
/// 深境螺旋角色 | ||
/// </summary> | ||
public class SpiralAbyssAvatar | ||
{ | ||
/// <summary> | ||
/// 深境螺旋角色 | ||
/// </summary> | ||
public class SpiralAbyssAvatar | ||
{ | ||
|
||
[JsonPropertyName("id")] | ||
public int AvatarId { get; set; } | ||
[JsonPropertyName("id")] | ||
public int AvatarId { get; set; } | ||
|
||
|
||
[JsonPropertyName("icon")] | ||
public string Icon { get; set; } | ||
|
||
[JsonPropertyName("icon")] | ||
public string Icon { get; set; } | ||
|
||
[JsonPropertyName("level")] | ||
public int Level { get; set; } | ||
|
||
[JsonPropertyName("level")] | ||
public int Level { get; set; } | ||
|
||
[JsonPropertyName("rarity")] | ||
public int Rarity { get; set; } | ||
|
||
[JsonPropertyName("rarity")] | ||
public int Rarity { get; set; } | ||
|
||
[JsonExtensionData] | ||
public Dictionary<string, object>? ExtensionData { get; set; } | ||
|
||
} | ||
} |
30 changes: 16 additions & 14 deletions
30
src/Starward.Core/GameRecord/Genshin/SpiralAbyss/SpiralAbyssBattle.cs
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,26 +1,28 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss | ||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss; | ||
|
||
|
||
/// <summary> | ||
/// 深境螺旋一场战斗 | ||
/// </summary> | ||
public class SpiralAbyssBattle | ||
{ | ||
|
||
/// <summary> | ||
/// 深境螺旋一场战斗 | ||
/// </summary> | ||
public class SpiralAbyssBattle | ||
{ | ||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
|
||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
|
||
[JsonPropertyName("timestamp")] | ||
[JsonConverter(typeof(SpiralAbyssTimeJsonConverter))] | ||
public DateTimeOffset Time { get; set; } | ||
|
||
[JsonPropertyName("timestamp")] | ||
[JsonConverter(typeof(SpiralAbyssTimeJsonConverter))] | ||
public DateTimeOffset Time { get; set; } | ||
|
||
[JsonPropertyName("avatars")] | ||
public List<SpiralAbyssAvatar> Avatars { get; set; } | ||
|
||
[JsonPropertyName("avatars")] | ||
public List<SpiralAbyssAvatar> Avatars { get; set; } | ||
|
||
[JsonExtensionData] | ||
public Dictionary<string, object>? ExtensionData { get; set; } | ||
|
||
} | ||
} |
55 changes: 29 additions & 26 deletions
55
src/Starward.Core/GameRecord/Genshin/SpiralAbyss/SpiralAbyssFloor.cs
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,45 +1,48 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss | ||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss; | ||
|
||
/// <summary> | ||
/// 深境螺旋层 | ||
/// </summary> | ||
public class SpiralAbyssFloor | ||
{ | ||
/// <summary> | ||
/// 深境螺旋层 | ||
/// </summary> | ||
public class SpiralAbyssFloor | ||
{ | ||
|
||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
|
||
|
||
[JsonPropertyName("icon")] | ||
public string Icon { get; set; } | ||
|
||
[JsonPropertyName("icon")] | ||
public string Icon { get; set; } | ||
|
||
[JsonPropertyName("is_unlock")] | ||
public bool IsUnlock { get; set; } | ||
|
||
[JsonPropertyName("is_unlock")] | ||
public bool IsUnlock { get; set; } | ||
|
||
[JsonPropertyName("settle_time")] | ||
public string SettleTime { get; set; } | ||
|
||
[JsonPropertyName("settle_time")] | ||
public string SettleTime { get; set; } | ||
|
||
[JsonPropertyName("star")] | ||
public int Star { get; set; } | ||
|
||
[JsonPropertyName("star")] | ||
public int Star { get; set; } | ||
|
||
[JsonPropertyName("max_star")] | ||
public int MaxStar { get; set; } | ||
|
||
[JsonPropertyName("max_star")] | ||
public int MaxStar { get; set; } | ||
|
||
[JsonPropertyName("levels")] | ||
public List<SpiralAbyssLevel> Levels { get; set; } | ||
|
||
/// <summary> | ||
/// 地脉异常 | ||
/// </summary> | ||
[JsonPropertyName("ley_line_disorder")] | ||
public List<string> LeyLineDisorder { get; set; } | ||
|
||
[JsonPropertyName("levels")] | ||
public List<SpiralAbyssLevel> Levels { get; set; } | ||
|
||
/// <summary> | ||
/// 地脉异常 | ||
/// </summary> | ||
[JsonPropertyName("ley_line_disorder")] | ||
public List<string> LeyLineDisorder { get; set; } | ||
[JsonExtensionData] | ||
public Dictionary<string, object>? ExtensionData { 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
45 changes: 24 additions & 21 deletions
45
src/Starward.Core/GameRecord/Genshin/SpiralAbyss/SpiralAbyssLevel.cs
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,39 +1,42 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss | ||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss; | ||
|
||
/// <summary> | ||
/// 深境螺旋间 | ||
/// </summary> | ||
public class SpiralAbyssLevel | ||
{ | ||
/// <summary> | ||
/// 深境螺旋间 | ||
/// </summary> | ||
public class SpiralAbyssLevel | ||
{ | ||
|
||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
[JsonPropertyName("index")] | ||
public int Index { get; set; } | ||
|
||
|
||
[JsonPropertyName("star")] | ||
public int Star { get; set; } | ||
|
||
|
||
[JsonPropertyName("star")] | ||
public int Star { get; set; } | ||
[JsonPropertyName("max_star")] | ||
public int MaxStar { get; set; } | ||
|
||
|
||
[JsonPropertyName("max_star")] | ||
public int MaxStar { get; set; } | ||
[JsonPropertyName("battles")] | ||
public List<SpiralAbyssBattle> Battles { get; set; } | ||
|
||
|
||
[JsonPropertyName("battles")] | ||
public List<SpiralAbyssBattle> Battles { get; set; } | ||
[JsonPropertyName("top_half_floor_monster")] | ||
public List<SpiralAbyssMonster> TopHalfFloorMonster { get; set; } | ||
|
||
|
||
[JsonPropertyName("top_half_floor_monster")] | ||
public List<SpiralAbyssMonster> TopHalfFloorMonster { get; set; } | ||
[JsonPropertyName("bottom_half_floor_monster")] | ||
public List<SpiralAbyssMonster> BottomHalfFloorMonster { get; set; } | ||
|
||
|
||
[JsonPropertyName("bottom_half_floor_monster")] | ||
public List<SpiralAbyssMonster> BottomHalfFloorMonster { get; set; } | ||
[JsonIgnore] | ||
public DateTimeOffset FirstBattleTime => Battles.FirstOrDefault()?.Time ?? new(); | ||
|
||
|
||
[JsonIgnore] | ||
public DateTimeOffset FirstBattleTime => Battles.FirstOrDefault()?.Time ?? new(); | ||
[JsonExtensionData] | ||
public Dictionary<string, object>? ExtensionData { 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
32 changes: 17 additions & 15 deletions
32
src/Starward.Core/GameRecord/Genshin/SpiralAbyss/SpiralAbyssRank.cs
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,29 +1,31 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss | ||
namespace Starward.Core.GameRecord.Genshin.SpiralAbyss; | ||
|
||
/// <summary> | ||
/// 深境螺旋最值统计 | ||
/// </summary> | ||
public class SpiralAbyssRank | ||
{ | ||
/// <summary> | ||
/// 深境螺旋最值统计 | ||
/// </summary> | ||
public class SpiralAbyssRank | ||
{ | ||
|
||
|
||
[JsonPropertyName("avatar_id")] | ||
public int AvatarId { get; set; } | ||
[JsonPropertyName("avatar_id")] | ||
public int AvatarId { get; set; } | ||
|
||
|
||
[JsonPropertyName("avatar_icon")] | ||
public string AvatarIcon { get; set; } | ||
|
||
[JsonPropertyName("avatar_icon")] | ||
public string AvatarIcon { get; set; } | ||
|
||
[JsonPropertyName("value")] | ||
public int Value { get; set; } | ||
|
||
[JsonPropertyName("value")] | ||
public int Value { get; set; } | ||
|
||
[JsonPropertyName("rarity")] | ||
public int Rarity { get; set; } | ||
|
||
[JsonPropertyName("rarity")] | ||
public int Rarity { get; set; } | ||
|
||
[JsonExtensionData] | ||
public Dictionary<string, object>? ExtensionData { 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
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
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
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
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
Oops, something went wrong.