diff --git a/users/services.py b/users/services.py index 9ea3ba6..8dee258 100644 --- a/users/services.py +++ b/users/services.py @@ -16,22 +16,17 @@ class CheckUserFieldDuplicateService: @staticmethod def check_custom_url_duplicate(): pass - -# 알림 관련 서비스 로직 -class NotifiationService: - @staticmethod - def set_content_by_type(): - pass + class UserToNotificationService: @staticmethod def get_new_notification_count(user: User): - return user.notifications.filter(created_at__lt=thirty_days_ago, is_read=False).count() + return user.notifications.filter(created_at__gt=thirty_days_ago, is_read=False).count() @staticmethod def get_all_notification(user: User): - return user.notifications.filter(created_at__lt=thirty_days_ago) + return user.notifications.filter(created_at__gt=thirty_days_ago) # 유저 -> 포트폴리오 관련 서비스 로직 @@ -82,4 +77,3 @@ class UserToProjectService: @staticmethod def get_scrap_project(user: User): return user.scrapped_projects.filter(is_published=True) -