mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
32 lines
625 B
Python
32 lines
625 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from ..utils.typing import GameType
|
|
|
|
|
|
class Base(BaseModel):
|
|
platform: GameType
|
|
|
|
|
|
class BaseUser(ABC, Base):
|
|
"""游戏用户"""
|
|
|
|
def __eq__(self, __value: object) -> bool:
|
|
if isinstance(__value, BaseUser):
|
|
return self.unique_identifier == __value.unique_identifier
|
|
return False
|
|
|
|
@property
|
|
@abstractmethod
|
|
def unique_identifier(self) -> str:
|
|
raise NotImplementedError
|
|
|
|
|
|
class BaseRawResponse(Base):
|
|
"""原始请求数据"""
|
|
|
|
|
|
class BaseProcessedData(Base):
|
|
"""处理/验证后的数据"""
|