mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
* ✨ 新 api 的 schemas * 👽️ 更新新赛季 api 的 schemas * ➕ 添加依赖 async-lru * 👽️ 更新新赛季 api 封装 * 👽️ 适配新赛季 api 40l * 🐛 api_type 忘记更新了 * 👽️ 适配新赛季 api blitz * 👽️ 适配新赛季 api bind * 🔥 暂时删除一些指令 等待新赛季开始 * 🚨 auto fix by pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
19 lines
796 B
Python
19 lines
796 B
Python
from datetime import datetime
|
|
from typing import Literal
|
|
|
|
from nonebot_plugin_orm import Model
|
|
from sqlalchemy import DateTime, String
|
|
from sqlalchemy.orm import Mapped, MappedAsDataclass, mapped_column
|
|
|
|
from ....db.models import PydanticType
|
|
from .schemas.base import SuccessModel
|
|
from .typing import Summaries
|
|
|
|
|
|
class TETRIOHistoricalData(MappedAsDataclass, Model):
|
|
id: Mapped[int] = mapped_column(init=False, primary_key=True)
|
|
user_unique_identifier: Mapped[str] = mapped_column(String(24), index=True)
|
|
api_type: Mapped[Literal['User Info', Summaries]] = mapped_column(String(16), index=True)
|
|
data: Mapped[SuccessModel] = mapped_column(PydanticType(get_model=[SuccessModel.__subclasses__], models=set()))
|
|
update_time: Mapped[datetime] = mapped_column(DateTime, index=True)
|