from typing import Dict, List, Optional

from pydantic import BaseModel


# 定义 stageDropList 类
class StageDropList(BaseModel):
    stageId: Optional[str]  # 可选的字段
    occPer: Optional[str]  # 可选的字段


class VoucherRelate(BaseModel):
    voucherId: str
    voucherItemType: str


class buildingProduct(BaseModel):
    roomType: str
    formulaId: str


# 定义 Item 类
class Item(BaseModel):
    itemId: Optional[str]
    name: Optional[str]
    description: Optional[str]
    rarity: Optional[str]
    iconId: Optional[str]
    overrideBkg: Optional[str]
    stackIconId: Optional[str]
    sortId: int
    usage: Optional[str]
    obtainApproach: Optional[str]
    hideInItemGet: bool
    classifyType: Optional[str]
    itemType: Optional[str]
    stageDropList: Optional[List[StageDropList]] = []
    buildingProductList: Optional[List[buildingProduct]] = []
    voucherRelateList: Optional[List[VoucherRelate]] = []


# 定义 Items 类
class Items(BaseModel):
    items: Dict[str, Item]
