improvement: Notification 도메인 구축 (#247) #248

Merged
seonkyu.kim merged 1 commits from improvement/#247-notification-domain into develop 2026-02-26 00:47:34 +00:00
Owner

📋 작업 요약

  • Notification 도메인 신규 구축 (PRD FR-NOTI-001/002)
  • 헤더 뱃지 unread count + 알림 목록 4개 API 제공
  • Single Table 설계 (NotificationRead 분리 불필요)

Closes #247

🛠️ 작업 내용 (Changes)

  • SPMS.Domain/Enums/NotificationCategory.cs — 알림 카테고리 enum (Send, Certificate, Service, Failure, System)
  • SPMS.Domain/Entities/Notification.cs — 알림 엔티티 (TargetAdminId, Category, Title, Content, LinkUrl, IsRead, ReadAt)
  • SPMS.Domain/Interfaces/INotificationRepository.cs — 리포지토리 인터페이스
  • SPMS.Infrastructure/Persistence/Configurations/NotificationConfiguration.cs — EF 설정 (인덱스, FK, 제약조건)
  • SPMS.Infrastructure/Persistence/Repositories/NotificationRepository.cs — 리포지토리 구현 (페이징, 필터, 일괄읽음)
  • SPMS.Infrastructure/AppDbContext.cs — DbSet 추가
  • SPMS.Infrastructure/DependencyInjection.cs — DI 등록
  • SPMS.Infrastructure/Migrations/AddNotificationTable — Migration
  • SPMS.Application/DTOs/Notification/* — DTO 7개
  • SPMS.Application/Interfaces/INotificationService.cs — 서비스 인터페이스
  • SPMS.Application/Services/NotificationService.cs — 서비스 구현 (멱등 읽음, 일괄읽음)
  • SPMS.Application/DependencyInjection.cs — DI 등록
  • SPMS.API/Controllers/NotificationController.cs — 4개 엔드포인트

📢 리뷰어 참고 사항 (To Reviewers)

  • 알림 생성 트리거는 이번 WP 범위 밖 (모델 + 읽기 API만 구축)
  • MarkAsReadAsync는 멱등 처리 (이미 읽은 알림 재요청 시 DB 업데이트 스킵)
  • MarkAllAsReadAsync는 ExecuteUpdateAsync 사용하여 일괄 처리
  • 에러코드는 generic NotFound("103") 재사용

체크리스트 (Self Checklist)

  • 빌드(Build)가 성공적으로 수행되었는가?
  • 모든 단위 테스트(Unit Test)를 통과하였는가?
  • 불필요한 로그나 주석을 제거하였는가?
  • 컨벤션(Clean Architecture, Naming)을 준수하였는가?
  • 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가?

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

dotnet build → 경고 0개, 오류 0개
Migration: AddNotificationTable 적용 완료
## 📋 작업 요약 - Notification 도메인 신규 구축 (PRD FR-NOTI-001/002) - 헤더 뱃지 unread count + 알림 목록 4개 API 제공 - Single Table 설계 (NotificationRead 분리 불필요) ## 🔗 관련 이슈 (Related Issues) Closes #247 ## 🛠️ 작업 내용 (Changes) - [x] `SPMS.Domain/Enums/NotificationCategory.cs` — 알림 카테고리 enum (Send, Certificate, Service, Failure, System) - [x] `SPMS.Domain/Entities/Notification.cs` — 알림 엔티티 (TargetAdminId, Category, Title, Content, LinkUrl, IsRead, ReadAt) - [x] `SPMS.Domain/Interfaces/INotificationRepository.cs` — 리포지토리 인터페이스 - [x] `SPMS.Infrastructure/Persistence/Configurations/NotificationConfiguration.cs` — EF 설정 (인덱스, FK, 제약조건) - [x] `SPMS.Infrastructure/Persistence/Repositories/NotificationRepository.cs` — 리포지토리 구현 (페이징, 필터, 일괄읽음) - [x] `SPMS.Infrastructure/AppDbContext.cs` — DbSet 추가 - [x] `SPMS.Infrastructure/DependencyInjection.cs` — DI 등록 - [x] `SPMS.Infrastructure/Migrations/AddNotificationTable` — Migration - [x] `SPMS.Application/DTOs/Notification/*` — DTO 7개 - [x] `SPMS.Application/Interfaces/INotificationService.cs` — 서비스 인터페이스 - [x] `SPMS.Application/Services/NotificationService.cs` — 서비스 구현 (멱등 읽음, 일괄읽음) - [x] `SPMS.Application/DependencyInjection.cs` — DI 등록 - [x] `SPMS.API/Controllers/NotificationController.cs` — 4개 엔드포인트 ## 📢 리뷰어 참고 사항 (To Reviewers) - 알림 생성 트리거는 이번 WP 범위 밖 (모델 + 읽기 API만 구축) - MarkAsReadAsync는 멱등 처리 (이미 읽은 알림 재요청 시 DB 업데이트 스킵) - MarkAllAsReadAsync는 ExecuteUpdateAsync 사용하여 일괄 처리 - 에러코드는 generic NotFound("103") 재사용 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드(Build)가 성공적으로 수행되었는가? - [x] 모든 단위 테스트(Unit Test)를 통과하였는가? - [x] 불필요한 로그나 주석을 제거하였는가? - [x] 컨벤션(Clean Architecture, Naming)을 준수하였는가? - [x] 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가? ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) ``` dotnet build → 경고 0개, 오류 0개 Migration: AddNotificationTable 적용 완료 ```
seonkyu.kim added 1 commit 2026-02-26 00:45:43 +00:00
- Domain: NotificationCategory enum, Notification entity, INotificationRepository
- Infrastructure: NotificationConfiguration, NotificationRepository, AppDbContext/DI 등록
- Migration: AddNotificationTable 생성 및 적용
- Application: DTO 7개, INotificationService, NotificationService, DI 등록
- API: NotificationController (summary, list, read, read-all)

Closes #247
seonkyu.kim added the
Priority
Medium
Status
In Progress
Type
Improvement
labels 2026-02-26 00:45:56 +00:00
seonkyu.kim self-assigned this 2026-02-26 00:45:59 +00:00
seonkyu.kim added this to the Phase 3: 운영 기능 milestone 2026-02-26 00:46:02 +00:00
seonkyu.kim requested review from Owners 2026-02-26 00:46:13 +00:00
seonkyu.kim merged commit 7dcdb03796 into develop 2026-02-26 00:47:34 +00:00
seonkyu.kim deleted branch improvement/#247-notification-domain 2026-02-26 00:47:46 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-26 00:51:20 +00:00
Sign in to join this conversation.
No description provided.