refactor(database): use a new 'On-Demand' design (#86)

Technical Details: https://blog.mxgame.top/2025/11/22/An-On-Demand-Design-Within-SQLModel/
This commit is contained in:
MingxuanGame
2025-11-23 21:41:02 +08:00
committed by GitHub
parent 42f1d53d3e
commit 40da994ae8
46 changed files with 4396 additions and 2354 deletions

View File

@@ -0,0 +1,13 @@
from . import beatmap # noqa: F401
from .beatmapset import BeatmapsetModel
from sqlmodel import SQLModel
SearchBeatmapset = BeatmapsetModel.generate_typeddict(("beatmaps.max_combo", "pack_tags"))
class SearchBeatmapsetsResp(SQLModel):
beatmapsets: list[SearchBeatmapset] # pyright: ignore[reportInvalidTypeForm]
total: int
cursor: dict[str, int | float | str] | None = None
cursor_string: str | None = None