refactor(multiplayer): 重构房间模型并添加新功能
- 重构 Room 模型,增加多个新字段和方法 - 新增 PlaylistItem 和 MultiplayerRoom 类 - 优化 MultiPlayerListItem 类,添加 from_mpListItem 方法 - 调整 Beatmap 类,将 id 字段标记为非可选
This commit is contained in:
@@ -62,7 +62,7 @@ class BeatmapBase(SQLModel):
|
||||
|
||||
class Beatmap(BeatmapBase, table=True):
|
||||
__tablename__ = "beatmaps" # pyright: ignore[reportAssignmentType]
|
||||
id: int | None = Field(default=None, primary_key=True, index=True)
|
||||
id: int = Field(primary_key=True, index=True)
|
||||
beatmapset_id: int = Field(foreign_key="beatmapsets.id", index=True)
|
||||
beatmap_status: BeatmapRankStatus
|
||||
# optional
|
||||
|
||||
Reference in New Issue
Block a user