Files
nonebot-plugin-tetris-stats/nonebot_plugin_tetris_stats/games/top/models.py
呵呵です ba0d1677cf 适配 Trending (#539)
*  适配 v1 tetrio 的 Trending

* 🗃️ 添加 compare_delta 配置项

* 🗃️ 添加 TETRIOLeagueUserMap 索引表

*  添加对比时间配置项

*  添加 compare_delta 解析函数

*  添加 Trending 类的 compare 方法

* 🗃️ 移除不正确的复合索引

*  定时任务拉取tl数据时同步更新索引

*  适配 trending

* 🐛 修复 find_entry 在无 uid 时的索引返回逻辑

* 📝 修正 compare_delta 迁移父迁移注释

* 🗃️ 为非 PostgreSQL 回填迁移补充外键约束

* 🔒 迁移中使用参数绑定设置 PG 内存参数

*  修正 Trends 的 vs 为 adpm

* 🐛 修正获取玩家 ID 的范围
2026-02-23 01:04:01 +08:00

13 lines
408 B
Python

from datetime import timedelta
from nonebot_plugin_orm import Model
from sqlalchemy import Interval
from sqlalchemy.orm import Mapped, MappedAsDataclass, mapped_column
class TOPUserConfig(MappedAsDataclass, Model):
__tablename__ = 'nb_t_top_u_cfg'
id: Mapped[int] = mapped_column(primary_key=True)
compare_delta: Mapped[timedelta | None] = mapped_column(Interval(native=True), nullable=True)