Files
nonebot-plugin-tetris-stats/nonebot_plugin_tetris_stats/games/schemas.py
dependabot[bot] 5910f05dfe ⬆️ Bump aiohttp from 3.10.1 to 3.10.2 (#395)
* ⬆️ Bump aiohttp from 3.10.1 to 3.10.2

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.1 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.10.1...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🚨 auto fix by pre-commit hooks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-12 11:20:21 +00:00

25 lines
546 B
Python

from abc import ABC, abstractmethod
from typing import Generic, TypeVar
from pydantic import BaseModel
from ..utils.typing import GameType
T = TypeVar('T', bound=GameType)
class BaseUser(BaseModel, ABC, Generic[T]):
"""游戏用户"""
platform: T
def __eq__(self, other: object) -> bool:
if isinstance(other, BaseUser):
return self.unique_identifier == other.unique_identifier
return False
@property
@abstractmethod
def unique_identifier(self) -> str:
raise NotImplementedError