diff --git a/app/enum/action_type.py b/app/enum/action_type.py index 2fbec69..667e3de 100644 --- a/app/enum/action_type.py +++ b/app/enum/action_type.py @@ -1,7 +1,9 @@ from enum import Enum + class ActionType(Enum): - CLICK = 1 - LIKE = 2 - WATCH = 3 - RATING = 4 \ No newline at end of file + CLICK = 1 + LIKE = 2 + WATCH = 3 + RATING = 4 + DISLIKE = 5 diff --git a/app/services/weight_strategy.py b/app/services/weight_strategy.py index 280d8d1..b7753b3 100644 --- a/app/services/weight_strategy.py +++ b/app/services/weight_strategy.py @@ -24,3 +24,5 @@ def convert_to_weight(type: ActionType, value: float) -> float: return 0.3 if value == 5: return 0.4 + if type == ActionType.DISLIKE: + return -0.1