✏️ Fix: [#41] 알림 관련 코드 삭제 및 30일 이전 코드 수정(lt -> gt)

This commit is contained in:
sm4640
2025-05-02 22:15:54 +09:00
parent d086eb39b6
commit ab8f3afd48

View File

@@ -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)