refactor(models): unify table names to singular form for consistency across models
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user