This commit is contained in:
27
orm/rating.py
Normal file
27
orm/rating.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from orm.reaction import ReactionKind
|
||||
|
||||
|
||||
RATING_REACTIONS = [
|
||||
ReactionKind.LIKE.value,
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.AGREE.value,
|
||||
ReactionKind.DISLIKE.value,
|
||||
ReactionKind.REJECT.value,
|
||||
ReactionKind.DISAGREE.value,
|
||||
]
|
||||
|
||||
|
||||
def is_negative(x):
|
||||
return x in [
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.LIKE.value,
|
||||
ReactionKind.PROOF.value,
|
||||
]
|
||||
|
||||
|
||||
def is_positive(x):
|
||||
return x in [
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.LIKE.value,
|
||||
ReactionKind.PROOF.value,
|
||||
]
|
Reference in New Issue
Block a user