33import com .hrr .backend .domain .notification .entity .NotificationDelivery ;
44import com .hrr .backend .domain .notification .entity .NotificationEvent ;
55import com .hrr .backend .domain .notification .entity .enums .NotificationCategory ;
6+ import com .hrr .backend .domain .notification .entity .enums .NotificationTypeName ;
7+ import com .hrr .backend .domain .notification .entity .enums .ResourceType ;
68import io .swagger .v3 .oas .annotations .media .Schema ;
79import lombok .*;
810
@@ -16,7 +18,7 @@ public class NotificationResponseDto {
1618 @ AllArgsConstructor
1719 @ Schema (description = "알림 목록 정보 DTO" )
1820 public static class InfoDto {
19- @ Schema (description = "알림 배달 ID" , example = "1" )
21+ @ Schema (description = "알림 ID" , example = "1" )
2022 private Long id ;
2123
2224 @ Schema (description = "알림 제목" , example = "내 인증에 댓글이 달렸어요" )
@@ -25,34 +27,32 @@ public static class InfoDto {
2527 @ Schema (description = "알림 메시지" , example = "어 저랑 같은 문제 풀었는데..." )
2628 private String message ;
2729
30+ @ Schema (description = "알림 썸네일 이미지 URL" , example = "https://example/image.jpg" )
31+ private String imageUrl ;
32+
2833 @ Schema (description = "알림 카테고리" , example = "VERIFICATION" )
2934 private NotificationCategory category ;
3035
31- @ Schema (description = "이동 대상 타입" , example = "COMMENT" )
32- private String targetType ;
36+ @ Schema (description = "알림 상세 타입 (프론트 분기 처리용)" , example = "CHALLENGE_EXTENSION" )
37+ private NotificationTypeName type ;
38+
39+ @ Schema (description = "이동 대상 타입" , example = "CHALLENGE" )
40+ private ResourceType targetType ;
3341
34- @ Schema (description = "이동 대상 ID" , example = "501 " )
42+ @ Schema (description = "이동 대상 ID" , example = "2 " )
3543 private Long targetId ;
3644
45+ @ Schema (description = "추가 컨텍스트 타입" , example = "ROUND" )
46+ private ResourceType contextType ;
47+
48+ @ Schema (description = "추가 컨텍스트 ID" , example = "3" )
49+ private Long contextId ;
50+
3751 @ Schema (description = "읽음 여부 (true: 읽음, false: 안읽음-NEW)" , example = "false" )
3852 private Boolean isRead ;
3953
4054 @ Schema (description = "알림 발생 시간" , example = "2025-12-25T14:30:00" )
4155 private LocalDateTime createdAt ;
42-
43- public static InfoDto from (NotificationDelivery delivery ) {
44- NotificationEvent event = delivery .getEvent ();
45- return InfoDto .builder ()
46- .id (delivery .getId ())
47- .title (event .getTitle ())
48- .message (event .getMessage ())
49- .category (event .getCategory ())
50- .targetType (event .getTargetType ().name ())
51- .targetId (event .getTargetId ())
52- .isRead (delivery .getIsRead ())
53- .createdAt (delivery .getCreatedAt ())
54- .build ();
55- }
5656 }
5757
5858 @ Getter
@@ -62,7 +62,7 @@ public static InfoDto from(NotificationDelivery delivery) {
6262 @ Schema (description = "알림 읽음 처리 결과 DTO" )
6363 public static class ReadResultDto {
6464
65- @ Schema (description = "알림 배달 ID" , example = "1" )
65+ @ Schema (description = "알림 ID" , example = "1" )
6666 private Long notificationId ;
6767
6868 @ Schema (description = "읽음 여부" , example = "true" )
0 commit comments