fsd
This commit is contained in:
parent
70a31aa9cb
commit
ef95ab85dd
3 changed files with 0 additions and 14 deletions
|
@ -17,7 +17,6 @@ from .mod_logs import *
|
|||
from .mod import *
|
||||
from .exiles import *
|
||||
from .sub_block import *
|
||||
from .sub_subscription import *
|
||||
from files.__main__ import Base, cache
|
||||
from files.helpers.security import *
|
||||
import random
|
||||
|
@ -124,7 +123,6 @@ class User(Base):
|
|||
original_username = deferred(Column(String))
|
||||
referred_by = Column(Integer, ForeignKey("users.id"))
|
||||
subs_created = Column(Integer, default=0)
|
||||
subs = Column(Integer, default=2)
|
||||
|
||||
badges = relationship("Badge", viewonly=True)
|
||||
subscriptions = relationship("Subscription", viewonly=True)
|
||||
|
@ -161,19 +159,10 @@ class User(Base):
|
|||
def all_blocks(self):
|
||||
return [x[0] for x in g.db.query(SubBlock.sub).filter_by(user_id=self.id).all()]
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def subbed_subs(self):
|
||||
return [x[0] for x in g.db.query(SubSubscription.sub).filter_by(user_id=self.id).all()]
|
||||
|
||||
@lazy
|
||||
def blocks(self, sub):
|
||||
return g.db.query(SubBlock).filter_by(user_id=self.id, sub=sub).one_or_none()
|
||||
|
||||
@lazy
|
||||
def subscribed_to(self, sub):
|
||||
return g.db.query(SubSubscription).filter_by(user_id=self.id, sub=sub).one_or_none()
|
||||
|
||||
@lazy
|
||||
def mod_date(self, sub):
|
||||
if self.id == AEVANN_ID: return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue