refactor(models): unify table names to singular form for consistency across models

This commit is contained in:
JSC
2025-07-05 18:11:19 +02:00
parent 21541c8184
commit 024c58f013
7 changed files with 12 additions and 12 deletions

View File

@@ -17,14 +17,14 @@ if TYPE_CHECKING:
class Playlist(db.Model):
"""Model for playlists containing sounds."""
__tablename__ = "playlists"
__tablename__ = "playlist"
id: Mapped[int] = mapped_column(Integer, primary_key=True)
name: Mapped[str] = mapped_column(String(255), nullable=False)
description: Mapped[Optional[str]] = mapped_column(Text, nullable=True)
genre: Mapped[Optional[str]] = mapped_column(String(100), nullable=True)
user_id: Mapped[Optional[int]] = mapped_column(
Integer, ForeignKey("users.id"), nullable=True
Integer, ForeignKey("user.id"), nullable=True
)
is_main: Mapped[bool] = mapped_column(
Boolean, default=False, nullable=False