formatted, linted, fixed
This commit is contained in:
12
orm/topic.py
12
orm/topic.py
@@ -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")
|
||||
|
Reference in New Issue
Block a user