model changes

This commit is contained in:
Igor Lobanov
2022-11-29 13:36:46 +01:00
parent b840823fce
commit 226aeddecd
20 changed files with 254 additions and 166 deletions

View File

@@ -9,8 +9,8 @@ class TopicFollower(Base):
__tablename__ = "topic_followers"
id = None # type: ignore
follower = Column(ForeignKey("user.slug"), primary_key=True)
topic = Column(ForeignKey("topic.slug"), primary_key=True)
follower_id = Column(ForeignKey("user.id"), primary_key=True, index=True)
topic_id = Column(ForeignKey("topic.id"), primary_key=True, index=True)
createdAt = Column(
DateTime, nullable=False, default=datetime.now, comment="Created at"
)