SIMNet/simnet/models/starrail/chronicle/characters.py

65 lines
1.1 KiB
Python
Raw Normal View History

2023-06-09 14:55:51 +00:00
"""Starrail chronicle character."""
from typing import List, Optional
2023-05-01 12:50:48 +00:00
from simnet.models.base import APIModel
2023-06-09 14:55:51 +00:00
from .. import character
2023-05-01 12:50:48 +00:00
2023-06-09 14:55:51 +00:00
__all__ = [
"StarRailEquipment",
"Rank",
"Relic",
"StarRailDetailCharacter",
"StarRailDetailCharacters",
]
2023-05-01 12:50:48 +00:00
2023-06-09 14:55:51 +00:00
class StarRailEquipment(APIModel):
"""Character equipment."""
2023-05-01 12:50:48 +00:00
id: int
level: int
rank: int
name: str
desc: str
icon: str
class Relic(APIModel):
2023-06-09 14:55:51 +00:00
"""Character relic."""
2023-05-01 12:50:48 +00:00
id: int
level: int
pos: int
name: str
desc: str
icon: str
rarity: int
class Rank(APIModel):
2023-06-09 14:55:51 +00:00
"""Character rank."""
2023-05-01 12:50:48 +00:00
id: int
pos: int
name: str
icon: str
desc: str
is_unlocked: bool
2023-06-09 14:55:51 +00:00
class StarRailDetailCharacter(character.StarRailPartialCharacter):
"""StarRail character with equipment and relics."""
2023-05-01 12:50:48 +00:00
image: str
2023-06-09 14:55:51 +00:00
equip: Optional[StarRailEquipment]
2023-05-01 12:50:48 +00:00
relics: List[Relic]
ornaments: List[Relic]
ranks: List[Rank]
2023-06-09 14:55:51 +00:00
class StarRailDetailCharacters(APIModel):
"""StarRail characters."""
2023-05-01 12:50:48 +00:00
avatar_list: List[StarRailDetailCharacter]