genshin-wiki/model/item.py

43 lines
780 B
Python
Raw Normal View History

2023-05-01 13:31:48 +00:00
from model.enums import FoodQuality, ItemType, MaterialType
from utils.model import BaseModel
2023-04-24 15:06:39 +00:00
class Item(BaseModel):
id: int
"""ID"""
name: str
"""名称"""
type: str | None
"""类型"""
icon: str
"""图标名"""
rarity: int | None
"""星级"""
description: str
"""描述"""
special_description: str | None
"""特殊描述"""
item_type: ItemType
"""物品类型"""
class Material(Item):
material_type: MaterialType
"""材料类型"""
class Food(Item):
quality: FoodQuality | None
"""食物质量"""
effect: str
"""效果"""
effect_icon: str
"""效果图标"""
effect_name: str
"""效果名称"""
class Namecard(Item):
pictures: list[str]
"""其它图标名"""