improve rbac

This commit is contained in:
knst-kotov
2021-08-17 12:14:26 +03:00
parent 9618802c6b
commit b8b7854c4c
9 changed files with 132 additions and 62 deletions

View File

@@ -12,7 +12,7 @@ class Shout(Base):
id = None
slug: str = Column(String, primary_key=True)
org: str = Column(String, nullable=False)
org_id: str = Column(ForeignKey("organization.id"), 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")