visibility-usage-opt
This commit is contained in:
parent
25dd0ba553
commit
a4841339ef
|
@ -347,7 +347,7 @@ def prepare_html_body(entry):
|
|||
|
||||
|
||||
def extract_html(entry):
|
||||
body_orig = (entry.get("body") or "").replace('\(', '(').replace('/)', ')')
|
||||
body_orig = (entry.get("body") or "").replace('\(', '(').replace('\)', ')')
|
||||
media = entry.get("media", [])
|
||||
kind = entry.get("type") or ""
|
||||
print("[extract] kind: " + kind)
|
||||
|
|
17
orm/shout.py
17
orm/shout.py
|
@ -39,14 +39,6 @@ class ShoutAuthor(Base):
|
|||
caption = Column(String, nullable=True, default="")
|
||||
|
||||
|
||||
class ShoutAllowed(Base):
|
||||
__tablename__ = "shout_allowed"
|
||||
|
||||
id = None # type: ignore
|
||||
shout = Column(ForeignKey("shout.slug"), primary_key=True)
|
||||
user = Column(ForeignKey("user.id"), primary_key=True)
|
||||
|
||||
|
||||
class Shout(Base):
|
||||
__tablename__ = "shout"
|
||||
|
||||
|
@ -62,14 +54,13 @@ class Shout(Base):
|
|||
authors = relationship(lambda: User, secondary=ShoutAuthor.__tablename__)
|
||||
topics = relationship(lambda: Topic, secondary=ShoutTopic.__tablename__)
|
||||
reactions = relationship(lambda: Reaction)
|
||||
visibleFor = relationship(lambda: User, secondary=ShoutAllowed.__tablename__)
|
||||
visibility = Column(String, nullable=True) # owner authors community public
|
||||
versionOf = Column(ForeignKey("shout.slug"), nullable=True)
|
||||
lang = Column(String, default='ru')
|
||||
oid = Column(String, nullable=True)
|
||||
|
||||
createdAt = Column(DateTime, nullable=False, default=datetime.now, comment="Created at")
|
||||
updatedAt = Column(DateTime, nullable=True, comment="Updated at")
|
||||
publishedAt = Column(DateTime, nullable=True)
|
||||
deletedAt = Column(DateTime, nullable=True)
|
||||
|
||||
versionOf = Column(ForeignKey("shout.slug"), nullable=True)
|
||||
draft = Column(Boolean, default=False)
|
||||
lang = Column(String, default='ru')
|
||||
oid = Column(String, nullable=True)
|
||||
|
|
|
@ -419,18 +419,17 @@ type Shout {
|
|||
slug: String!
|
||||
body: String!
|
||||
createdAt: DateTime!
|
||||
authors: [Author]
|
||||
lang: String
|
||||
community: String
|
||||
cover: String
|
||||
layout: String
|
||||
draft: Boolean
|
||||
versionOf: Shout # translations and adaptations
|
||||
visibleFor: [User]
|
||||
topics: [Topic]
|
||||
mainTopic: String
|
||||
title: String
|
||||
subtitle: String
|
||||
authors: [Author]
|
||||
lang: String
|
||||
community: String
|
||||
cover: String
|
||||
layout: String # audio video literature image
|
||||
versionOf: String # for translations and re-telling the same story
|
||||
visibility: String # owner authors community public
|
||||
updatedAt: DateTime
|
||||
updatedBy: User
|
||||
deletedAt: DateTime
|
||||
|
|
Loading…
Reference in New Issue
Block a user