Skip to content

Commit

Permalink
backend: images에 like_count 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtaejin3 committed Dec 15, 2024
1 parent 480b423 commit ba092c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions backend/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Images(Base):
title = Column(String, nullable=False)
content = Column(String, nullable=False)
categories = Column(ARRAY(String), nullable=False)
like_count = Column(Integer, default=0)
user_id = Column(Integer, ForeignKey("users.id"), nullable=False)
user = relationship("User", back_populates="images")
likes = relationship("Likes", back_populates="image")
Expand Down
1 change: 0 additions & 1 deletion backend/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ class ImageCreate(BaseModel):
title: str
content: str
categories: List[str]
likes: int = 0

0 comments on commit ba092c8

Please sign in to comment.