remove CommentSubscription; fix subscribe/unsibscribe method

This commit is contained in:
knst-kotov
2022-06-23 11:39:00 +03:00
parent f92be99bce
commit f93b17cead
6 changed files with 14 additions and 45 deletions

View File

@@ -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, ShoutCommentsSubscription
ShoutRatingStorage, ShoutViewStorage
from orm.base import Base, engine, local_session
from orm.comment import Comment, CommentRating #, CommentRatingStorage
from orm.proposal import Proposal, ProposalRating #, ProposalRatingStorage

View File

@@ -11,14 +11,6 @@ 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"