feat(database): 新增 Score 数据库模型并更新 User 关系

- 创建 Score 类作为成绩数据库模型,对应 osu! API 中的 Score 对象
- 在 User 模型中添加与 Score 的关系- 优化了数据库表结构,增加了索引和字段约束
This commit is contained in:
jimmy-sketch
2025-07-25 12:34:56 +08:00
parent 3ef6397428
commit 86e815b4e2
2 changed files with 43 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
# ruff: noqa: I002
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
from typing import Optional
@@ -95,7 +97,6 @@ class User(SQLModel, table=True):
back_populates="user"
)
# ============================================
# Lazer API 专用表模型
# ============================================