prod: UI Optimisée mise en production
- Documentation archivée et réorganisée - Backend: Ajout tests, migrations, library service, rate limiting - Frontend: Suppression Flutter, focus sur interface web HTML/JS - Tailwind CSS ajouté pour le style - Améliorations UX et corrections bugs Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -12,6 +12,8 @@ from app.core.database import Base
|
||||
if TYPE_CHECKING:
|
||||
from app.models.playlist import Playlist
|
||||
from app.models.playlist_track import PlaylistTrack
|
||||
from app.models.listening_history import ListeningHistory
|
||||
from app.models.liked_track import LikedTrack
|
||||
|
||||
|
||||
class User(Base):
|
||||
@@ -100,6 +102,20 @@ class User(Base):
|
||||
lazy="selectin",
|
||||
)
|
||||
|
||||
listening_history: Mapped[list["ListeningHistory"]] = relationship(
|
||||
"ListeningHistory",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="selectin",
|
||||
)
|
||||
|
||||
liked_tracks: Mapped[list["LikedTrack"]] = relationship(
|
||||
"LikedTrack",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="selectin",
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<User {self.username} ({self.email})>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user