refactored-shout-comments
This commit is contained in:
@@ -4,7 +4,7 @@ from orm.user import User, UserRating, UserRole, UserStorage
|
||||
from orm.topic import Topic, TopicSubscription, TopicStorage
|
||||
from orm.notification import Notification
|
||||
from orm.shout import Shout, ShoutAuthor, ShoutTopic, ShoutRating, ShoutViewByDay,\
|
||||
ShoutRatingStorage, ShoutViewStorage
|
||||
ShoutRatingStorage, ShoutViewStorage, ShoutCommentsSubscription
|
||||
from orm.base import Base, engine, local_session
|
||||
from orm.comment import Comment, CommentRating #, CommentRatingStorage
|
||||
from orm.proposal import Proposal, ProposalRating #, ProposalRatingStorage
|
||||
|
@@ -7,7 +7,7 @@ from orm.base import Base
|
||||
|
||||
|
||||
class ProposalRating(Base):
|
||||
__tablename__ = "comment_rating"
|
||||
__tablename__ = "proposal_rating"
|
||||
|
||||
id = None
|
||||
proposal_id = Column(ForeignKey('proposal.id'), primary_key = True)
|
||||
|
@@ -11,6 +11,14 @@ from functools import reduce
|
||||
|
||||
import asyncio
|
||||
|
||||
class ShoutCommentsSubscription(Base):
|
||||
__tablename__ = "shout_comments_subscription"
|
||||
|
||||
id = None
|
||||
subscriber = Column(ForeignKey('user.slug'), primary_key = True)
|
||||
shout = Column(ForeignKey('shout.slug'), primary_key = True)
|
||||
createdAt: str = Column(DateTime, nullable=False, default = datetime.now, comment="Created at")
|
||||
|
||||
class ShoutAuthor(Base):
|
||||
__tablename__ = "shout_author"
|
||||
|
||||
|
Reference in New Issue
Block a user