This commit is contained in:
Aevann1 2021-08-06 14:22:29 +02:00
parent e69a679965
commit b60cc38f5c
7 changed files with 49 additions and 25 deletions

View file

@ -99,7 +99,17 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
def __repr__(self):
return f"<Submission(id={self.id})>"
@property
@lazy
def comment_count(self):
return len(self.comments)
@property
@lazy
def score(self):
return self.upvotes - self.downvotes
@property
@lazy
def hotscore(self):