Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rinee/Server into feature/mail
  • Loading branch information
qormoon committed Jun 26, 2024
2 parents 1f93868 + 7fb621e commit 3ff273b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
@Builder
public class AnniversaryResponseDTO {
private Long id;
private String name;
private String anniversaryDate;
private String type;
private List<Map<String, Integer>> dDays;

public static AnniversaryResponseDTO of(Anniversary anniversary, List<Map<String, Integer>> dDays) {
return AnniversaryResponseDTO.builder()
.id(anniversary.getId())
.name(anniversary.getName())
.anniversaryDate(anniversary.getAnniversaryDate().toString())
.type(anniversary.getType().name())
.dDays(dDays)
Expand All @@ -37,6 +39,7 @@ public static AnniversaryResponseDTO empty() {

return AnniversaryResponseDTO.builder()
.id(null)
.name(null)
.anniversaryDate(null)
.type(null)
.dDays(dDays)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static MemberResponseDTO of(Member member) {
.anniversaries(member.getAnniversaries().stream()
.map(anniversary -> Map.<String, Object>of(
"id", anniversary.getId(),
"name", anniversary.getName(),
"anniversaryDate", anniversary.getAnniversaryDate().toString(),
"type", anniversary.getType().name(),
"d-day", anniversaryService.calculateDDay(anniversary)
Expand Down

0 comments on commit 3ff273b

Please sign in to comment.