shout under organization

This commit is contained in:
knst-kotov
2021-08-08 12:23:12 +00:00
parent f37c1f4839
commit a146a8dd1d
3 changed files with 61 additions and 18 deletions

View File

@@ -9,9 +9,17 @@ from orm.base import Base
class Shout(Base):
__tablename__ = 'shout'
id = None
slug: str = Column(String, primary_key=True)
org: str = Column(String, nullable=False)
author_id: str = Column(ForeignKey("user.id"), nullable=False, comment="Author")
body: str = Column(String, nullable=False, comment="Body")
createdAt: str = Column(DateTime, nullable=False, default = datetime.now, comment="Created at")
updatedAt: str = Column(DateTime, nullable=True, comment="Updated at")
replyTo: str = Column(ForeignKey("shout.slug"), nullable=True)
versionOf: str = Column(ForeignKey("shout.slug"), nullable=True)
tags: str = Column(String, nullable=True)
topics: str = Column(String, nullable=True)
# TODO: add all the fields