MibooGram/core/services/history_data/models.py
2024-04-27 18:13:54 +08:00

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)