콘텐츠 공유 페이지 및 공유하기, 좋아요, 댓글 기능 추가
This commit is contained in:
1 parent
346b461e9c
commit
5f3e8ec341
27 files changed
+1546
-95
No files matched your search
@@ -16,8 +16,10 @@ from app.database.session import Base
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.comment.models import Comment
|
||||
from app.credit.models import CreditChargeRequest, CreditTransaction
|
||||
from app.home.models import Project
|
||||
from app.video.models import VideoReaction
|
||||
|
||||
|
||||
class User(Base):
|
||||
@@ -295,6 +297,20 @@ class User(Base):
|
||||
lazy="noload",
|
||||
)
|
||||
|
||||
comments: Mapped[List["Comment"]] = relationship(
|
||||
"Comment",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="noload",
|
||||
)
|
||||
|
||||
video_reactions: Mapped[List["VideoReaction"]] = relationship(
|
||||
"VideoReaction",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="noload",
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return (
|
||||
f"<User("
|
||||
|
||||
Reference in new issue
Block a user