2024-02-02 12:03:44 +00:00
|
|
|
from orm.reaction import ReactionKind
|
|
|
|
|
2024-04-09 11:03:50 +00:00
|
|
|
|
|
|
|
PROPOSAL_REACTIONS = [
|
2024-02-02 12:03:44 +00:00
|
|
|
ReactionKind.ACCEPT.value,
|
|
|
|
ReactionKind.REJECT.value,
|
2024-04-09 11:03:50 +00:00
|
|
|
ReactionKind.AGREE.value,
|
2024-02-02 12:59:22 +00:00
|
|
|
ReactionKind.DISAGREE.value,
|
2024-04-09 11:03:50 +00:00
|
|
|
ReactionKind.ASK.value,
|
|
|
|
ReactionKind.PROPOSE.value,
|
|
|
|
]
|
|
|
|
|
|
|
|
PROOF_REACTIONS = [
|
|
|
|
ReactionKind.PROOF.value,
|
|
|
|
ReactionKind.DISPROOF.value
|
|
|
|
]
|
|
|
|
|
|
|
|
RATING_REACTIONS = [
|
|
|
|
ReactionKind.LIKE.value,
|
|
|
|
ReactionKind.DISLIKE.value
|
2024-02-02 12:59:22 +00:00
|
|
|
]
|
2024-02-02 12:03:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
def is_negative(x):
|
|
|
|
return x in [
|
2024-04-09 11:03:50 +00:00
|
|
|
ReactionKind.DISLIKE.value,
|
|
|
|
ReactionKind.DISPROOF.value,
|
|
|
|
ReactionKind.REJECT.value,
|
2024-02-02 12:03:44 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def is_positive(x):
|
|
|
|
return x in [
|
|
|
|
ReactionKind.ACCEPT.value,
|
|
|
|
ReactionKind.LIKE.value,
|
|
|
|
ReactionKind.PROOF.value,
|
|
|
|
]
|