HonkaiStarRailWikiDataParser/models/avatar.py

61 lines
1.1 KiB
Python
Raw Normal View History

2023-04-23 15:18:42 +00:00
from typing import List
2023-04-23 14:06:11 +00:00
from pydantic import BaseModel
2023-04-28 11:32:53 +00:00
from .enums import Quality, Destiny, Element
from .material import Material
2023-04-23 14:06:11 +00:00
class AvatarInfo(BaseModel):
2023-04-23 15:18:42 +00:00
occupation: str = ""
2023-04-23 14:06:11 +00:00
"""所属"""
2023-04-23 15:18:42 +00:00
faction: str = ""
2023-04-23 14:06:11 +00:00
"""派系"""
class AvatarItem(BaseModel):
2023-04-23 15:18:42 +00:00
item: Material
2023-04-23 14:06:11 +00:00
"""物品"""
count: int
"""数量"""
class AvatarPromote(BaseModel):
2023-04-23 15:18:42 +00:00
required_level: int
2023-04-23 14:06:11 +00:00
"""突破所需等级"""
promote_level: int = 0
"""突破等级"""
max_level: int
"""解锁的等级上限"""
coin: int = 0
"""信用点"""
2023-05-28 10:18:56 +00:00
items: List[AvatarItem]
2023-04-23 14:06:11 +00:00
"""突破所需材料"""
class AvatarSoul(BaseModel):
name: str
""" 名称 """
desc: str
""" 介绍 """
class Avatar(BaseModel):
id: int
"""角色ID"""
name: str
"""名称"""
2023-04-28 11:32:53 +00:00
icon: str
"""图标"""
2023-04-23 14:06:11 +00:00
quality: Quality
"""品质"""
destiny: Destiny
"""命途"""
element: Element
"""属性"""
information: AvatarInfo
"""角色信息"""
promote: List[AvatarPromote]
"""角色突破数据"""
soul: List[AvatarSoul]
"""角色星魂数据"""