mirror of
https://github.com/PaiGramTeam/HonkaiStarRailWikiDataParser.git
synced 2024-11-16 06:25:25 +00:00
31 lines
499 B
Python
31 lines
499 B
Python
|
from typing import List, Dict
|
||
|
|
||
|
import ujson
|
||
|
from pydantic import BaseModel
|
||
|
|
||
|
|
||
|
class Content(BaseModel):
|
||
|
content_id: int
|
||
|
"""内容ID"""
|
||
|
ext: str
|
||
|
"""扩展信息"""
|
||
|
icon: str
|
||
|
"""图标"""
|
||
|
summary: str
|
||
|
"""摘要"""
|
||
|
title: str
|
||
|
"""标题"""
|
||
|
|
||
|
@property
|
||
|
def data(self) -> Dict:
|
||
|
return ujson.loads(self.ext)
|
||
|
|
||
|
|
||
|
class Children(BaseModel):
|
||
|
id: int
|
||
|
"""分类ID"""
|
||
|
name: str
|
||
|
"""分类名称"""
|
||
|
list: List[Content]
|
||
|
"""内容列表"""
|