-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from jurumarble/dev
Dev
- Loading branch information
Showing
10 changed files
with
104 additions
and
35 deletions.
There are no files selected for viewing
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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
src/main/java/co/kr/jurumarble/notification/dto/NotificationDtoV1.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,43 @@ | ||
package co.kr.jurumarble.notification.dto; | ||
|
||
import co.kr.jurumarble.notification.domain.Notification; | ||
import lombok.*; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class NotificationDtoV1 { | ||
Long id; | ||
|
||
String url; | ||
|
||
String content; | ||
|
||
Notification.NotificationType type; | ||
|
||
Boolean isRead; | ||
|
||
LocalDateTime createdAt; | ||
|
||
@Builder | ||
public NotificationDtoV1(Long id, String url, String content, Notification.NotificationType type, Boolean isRead, LocalDateTime createdAt) { | ||
this.id = id; | ||
this.url = url; | ||
this.content = content; | ||
this.type = type; | ||
this.isRead = isRead; | ||
this.createdAt = createdAt; | ||
} | ||
|
||
|
||
public static NotificationDtoV1 from(Notification notification) { | ||
return NotificationDtoV1.builder() | ||
.id(notification.getId()) | ||
.url(notification.getUrl()) | ||
.content(notification.getContent()) | ||
.type(notification.getNotificationType()) | ||
.isRead(notification.getIsRead()) | ||
.createdAt(notification.getCreatedDate()).build(); | ||
} | ||
} |
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
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
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
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