From 685988c219649a2331b26f6969c1639b6a242675 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 30 Nov 2023 11:04:03 +0300 Subject: [PATCH] createdby --- orm/shout.py | 2 ++ schemas/core.graphql | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/orm/shout.py b/orm/shout.py index 7ff2975c..2ef8ddb3 100644 --- a/orm/shout.py +++ b/orm/shout.py @@ -61,6 +61,8 @@ class Shout(Base): published_at = Column(Integer, nullable=True) deleted_at = Column(Integer, nullable=True) + created_by = Column(ForeignKey("author.id"), nullable=False) + updated_by = Column(ForeignKey("author.id"), nullable=True) deleted_by = Column(ForeignKey("author.id"), nullable=True) body = Column(String, nullable=False, comment="Body") diff --git a/schemas/core.graphql b/schemas/core.graphql index 434f24c3..5d17dbb7 100644 --- a/schemas/core.graphql +++ b/schemas/core.graphql @@ -116,9 +116,11 @@ type Shout { description: String created_at: Int! topics: [Topic] + created_by: Author! + updated_by: Author + deleted_by: Author authors: [Author] communities: [Community] - # mainTopic: String title: String subtitle: String lang: String @@ -128,9 +130,7 @@ type Shout { version_of: String visibility: ShoutVisibility updated_at: Int - updated_by: Author deleted_at: Int - deleted_by: Author published_at: Int media: String stat: Stat