mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-25 18:04:00 +00:00
27 lines
555 B
Python
27 lines
555 B
Python
import enum
|
|
from typing import Dict
|
|
|
|
from pydantic import BaseModel
|
|
from simnet.models.genshin.chronicle.abyss import SpiralAbyss
|
|
|
|
from gram_core.services.history_data.models import HistoryData
|
|
|
|
__all__ = (
|
|
"HistoryData",
|
|
"HistoryDataTypeEnum",
|
|
"HistoryDataAbyss",
|
|
)
|
|
|
|
|
|
class HistoryDataTypeEnum(int, enum.Enum):
|
|
ABYSS = 0 # 深境螺旋
|
|
|
|
|
|
class HistoryDataAbyss(BaseModel):
|
|
abyss_data: SpiralAbyss
|
|
character_data: Dict[int, int]
|
|
|
|
@classmethod
|
|
def from_data(cls, data: HistoryData):
|
|
return cls.parse_obj(data.data)
|