genshin-wiki/model/item.py

45 lines
821 B
Python
Raw Permalink Normal View History

2023-08-21 11:27:53 +00:00
from model.enums import FoodQuality, ItemType
2023-05-01 13:31:48 +00:00
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):
2023-08-21 11:27:53 +00:00
material_type: str
2023-04-24 15:06:39 +00:00
"""材料类型"""
2023-08-21 11:27:53 +00:00
material_type_description: str
"""材料类型描述"""
2023-04-24 15:06:39 +00:00
class Food(Item):
quality: FoodQuality | None
"""食物质量"""
effect: str
"""效果"""
effect_icon: str
"""效果图标"""
effect_name: str
"""效果名称"""
class Namecard(Item):
pictures: list[str]
"""其它图标名"""