From f26a92cba64591a00245cf3d213ae32bad5b259a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9A=A9=EC=A4=80?= <59381113+jjuny0310@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:09:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=95=8C=EB=A6=BC=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20read=20=ED=95=84=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 알림 조회 응답 데이터에 read 필드 추가 * test: 알림 조회 Controller 테스트 read 필드 추가 * docs: API 문서 최신화 --- .../dto/GetNotificationElement.java | 2 + src/main/resources/static/docs/index.html | 91 ++++++++++--------- .../NotificationControllerTest.java | 1 + 3 files changed, 52 insertions(+), 42 deletions(-) diff --git a/src/main/java/com/ssafy/ssafsound/domain/notification/dto/GetNotificationElement.java b/src/main/java/com/ssafy/ssafsound/domain/notification/dto/GetNotificationElement.java index 8e2b6556..4e93254a 100644 --- a/src/main/java/com/ssafy/ssafsound/domain/notification/dto/GetNotificationElement.java +++ b/src/main/java/com/ssafy/ssafsound/domain/notification/dto/GetNotificationElement.java @@ -17,6 +17,7 @@ public class GetNotificationElement { private Long contentId; private ServiceType serviceType; private NotificationType notificationType; + private Boolean read; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createAt; @@ -28,6 +29,7 @@ public static GetNotificationElement from(Notification notification) { .contentId(notification.getContentId()) .serviceType(notification.getServiceType()) .notificationType(notification.getNotificationType()) + .read(notification.getRead()) .createAt(notification.getCreatedAt()) .build(); } diff --git a/src/main/resources/static/docs/index.html b/src/main/resources/static/docs/index.html index 2fae2e7b..bbab4ba2 100644 --- a/src/main/resources/static/docs/index.html +++ b/src/main/resources/static/docs/index.html @@ -772,7 +772,7 @@
구체적인 알림 타입, SYSTEM | POST_REPLAY | COMMENT_REPLAY | RECRUIT~ 단, RECRUIT는 추가될 수 있음.
data.notifications[].read
Boolean
새로 들어온 알림인지 여부, 처음 조회된 알림이면 false
data.notifications[].createAt
String
알림이 저장된 시간, yyyy-MM-dd HH:mm:ss