✏️ Fix: [#41] 알림 관련 코드 삭제 및 30일 이전 코드 수정(lt -> gt)
This commit is contained in:
@@ -17,21 +17,16 @@ class CheckUserFieldDuplicateService:
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user