This commit is contained in:
12
orm/shout.py
12
orm/shout.py
@@ -4,6 +4,10 @@ from sqlalchemy import JSON, Boolean, Column, ForeignKey, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from services.db import Base
|
||||
from orm.community import Community
|
||||
from orm.author import Author
|
||||
from orm.reaction import Reaction
|
||||
from orm.topic import Topic
|
||||
|
||||
|
||||
class ShoutTopic(Base):
|
||||
@@ -67,10 +71,10 @@ class Shout(Base):
|
||||
layout = Column(String, nullable=False, default='article')
|
||||
media = Column(JSON, nullable=True)
|
||||
|
||||
authors = relationship('author', secondary='shout_author')
|
||||
topics = relationship('topic', secondary='shout_topic')
|
||||
communities = relationship('community', secondary='shout_community')
|
||||
reactions = relationship('reaction')
|
||||
authors = relationship(Author, secondary='shout_author')
|
||||
topics = relationship(Topic, secondary='shout_topic')
|
||||
communities = relationship(Community, secondary='shout_community')
|
||||
reactions = relationship(Reaction)
|
||||
|
||||
lang = Column(String, nullable=False, default='ru', comment='Language')
|
||||
version_of = Column(ForeignKey('shout.id'), nullable=True)
|
||||
|
Reference in New Issue
Block a user