formatted, linted, fixed

This commit is contained in:
2022-09-04 20:20:38 +03:00
parent f7b9a066b9
commit 71f3ac5ed6
22 changed files with 357 additions and 303 deletions

View File

@@ -17,7 +17,9 @@ class TopicFollower(Base):
id = None # type: ignore
follower = Column(ForeignKey("user.slug"), primary_key=True)
topic = Column(ForeignKey("topic.slug"), primary_key=True)
createdAt = Column(DateTime, nullable=False, default=datetime.now, comment="Created at")
createdAt = Column(
DateTime, nullable=False, default=datetime.now, comment="Created at"
)
class Topic(Base):
@@ -28,6 +30,10 @@ class Topic(Base):
title = Column(String, nullable=False, comment="Title")
body = Column(String, nullable=True, comment="Body")
pic = Column(String, nullable=True, comment="Picture")
children = Column(JSONType, nullable=True, default=[], comment="list of children topics")
community = Column(ForeignKey("community.slug"), nullable=False, comment="Community")
children = Column(
JSONType, nullable=True, default=[], comment="list of children topics"
)
community = Column(
ForeignKey("community.slug"), nullable=False, comment="Community"
)
oid = Column(String, nullable=True, comment="Old ID")