Skip to content

Conversation

@jueunk617
Copy link
Collaborator

@jueunk617 jueunk617 commented Oct 8, 2025

📌 개요

사용자가 마이페이지에서 알림 수신 설정을 관리할 수 있는 기능을 구현했습니다. 5가지 알림 유형(시스템, 스터디룸, 학습, 게시글 댓글, 메시지 댓글)을 개별적으로 ON/OFF 할 수 있으며, 전체 알림을 한 번에 켜거나 끌 수도 있습니다. (모든 기능은 와이어프레임 기준으로 구현했습니다.)

🔨 작업 내용

NotificationSettingService 구현

initializeSettings(): 회원가입 시 기본 설정 자동 생성 (모두 true)
getSettings(): 사용자 설정 조회
toggleSetting(): 개별 설정 토글
toggleAllSettings(): 전체 ON/OFF
isNotificationEnabled(): 알림 발송 전 설정 확인용
deleteSettings(): 사용자 삭제 시 설정도 함께 삭제

NotificationSettingController 구현

GET /api/users/me/notification-settings: 설정 조회
PUT /api/users/me/notification-settings/{type}: 개별 토글
PUT /api/users/me/notification-settings/all: 전체 ON/OFF

에러 코드 추가

NOTIFICATION_SETTING_001: 알림 설정을 찾을 수 없습니다 (404)
NOTIFICATION_SETTING_002: 잘못된 알림 설정 타입입니다 (400)

🔗 관련 이슈

Closes #207

📝 참고 사항

설계 결정사항

  • 일괄 업데이트 방식 채택 : 요청에 포함된 필드만 업데이트하여 유연성 확보
  • 기본값 true : 알림 설정이 없는 경우 모든 알림을 받는 것으로 기본 동작
  • 회원가입 시 자동 초기화 : 사용자가 별도 설정 없이도 바로 사용 가능
  • 중복 초기화 방지 : existsByUserId() 체크로 이미 존재하면 생략

✅ 체크리스트

  • 기능 동작 확인
  • 테스트 코드 작성
  • 문서/주석 추가 및 최신화

@jueunk617 jueunk617 self-assigned this Oct 8, 2025
@github-actions github-actions bot changed the title Feat: 알림 설정 기능 구현 Feat: 알림 설정 기능 구현 (#207) Oct 8, 2025
@jueunk617 jueunk617 merged commit 13af9c4 into dev Oct 8, 2025
3 checks passed
@github-actions github-actions bot deleted the Feat/207 branch October 8, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants