CRUD comments

This commit is contained in:
knst-kotov
2021-11-21 14:04:38 +03:00
parent 2c5f8335d6
commit 252807b3b1
4 changed files with 70 additions and 3 deletions

View File

@@ -25,8 +25,8 @@ class Comment(Base):
updatedBy = Column(ForeignKey("user.id"), nullable=True, comment="Last Editor")
deletedAt = Column(DateTime, nullable=True, comment="Deleted at")
deletedBy = Column(ForeignKey("user.id"), nullable=True, comment="Deleted by")
shout: int = Column(ForeignKey("shout.id"), nullable=True, comment="Shout ID")
rating: int = Column(Integer, nullable=True, comment="Comment Rating")
shout: int = Column(ForeignKey("shout.id"), nullable=False, comment="Shout ID")
replyTo: int = Column(ForeignKey("comment.id"), nullable=True, comment="comment ID")
ratings = relationship(CommentRating, foreign_keys=CommentRating.comment_id)
old_id: str = Column(String, nullable = True)
old_thread: str = Column(String, nullable = True)