-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
062fc95
commit 57f5216
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...dontbe/www/DontBeServer/api/notification/dto/response/NotificationAllResponseDtoVer3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.dontbe.www.DontBeServer.api.notification.dto.response; | ||
|
||
import com.dontbe.www.DontBeServer.api.member.domain.Member; | ||
import com.dontbe.www.DontBeServer.api.notification.domain.Notification; | ||
import com.dontbe.www.DontBeServer.common.util.TimeUtilCustom; | ||
|
||
public record NotificationAllResponseDtoVer3( | ||
long memberId, //사용하는 유저Id | ||
String memberNickname, //사용하는 유저 닉네임 | ||
String triggerMemberNickname, //노티 유발자의 닉네임 | ||
String triggerMemberProfileUrl, //노티 유발자 프로필 사진url | ||
String notificationTriggerType, | ||
String time, // 노티가 발생한 시간을 (년-월-일 시:분:초) | ||
Long notificationTriggerId , // 노티 발생 시 해당 경우의 Id | ||
String notificationText, // 댓글 노티에 나올 댓글 내용 | ||
boolean isNotificationChecked, // 유저가 확인한 노티인지 아닌지 | ||
Boolean isDeleted, //노티 유발자가 탈퇴한 회원인지 아닌지 | ||
long notificationId, //조회된 노티의 id값 | ||
long triggerMemberId //노티 유발자의 memberId | ||
) { | ||
public static NotificationAllResponseDtoVer3 of(Member usingMember, String triggerMemberNickname, Notification notification, | ||
boolean isNotificationChecked, Long notificationTriggerId, String imageUrl, boolean isDeletedMember, long triggerMemberId) { | ||
return new NotificationAllResponseDtoVer3( | ||
usingMember.getId(), | ||
usingMember.getNickname(), | ||
triggerMemberNickname, | ||
imageUrl, | ||
notification.getNotificationTriggerType(), | ||
TimeUtilCustom.refineTime(notification.getCreatedAt()), | ||
notificationTriggerId, | ||
notification.getNotificationText(), | ||
isNotificationChecked, | ||
isDeletedMember, | ||
notification.getId(), | ||
triggerMemberId | ||
); | ||
} | ||
|
||
} |