Skip to content

Commit

Permalink
feat: 패널 정보 응답에 idprovider를 추가한다 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
soomanbaek committed Aug 28, 2023
1 parent aca84ce commit 45ec520
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PanelResponse {
private String sid;
private String title;
private String description;
private Long authorId;
private Author author;
private long scarpNum;
private boolean isArchived;
private LocalDateTime createdAt;
Expand All @@ -27,11 +27,18 @@ public static PanelResponse toDto(Panel panel){
.sid(panel.getSid())
.title(panel.getTitle())
.description(panel.getDescription())
.authorId(panel.getMember().getId())
.author(new Author(panel.getMember().getId(), panel.getMember().getNickname()))
.isArchived(panel.isArchived())
.scarpNum(panel.getScarpNum())
.createdAt(panel.getCreatedDate())
.updatedAt(panel.getUpdatedDate())
.build();
}

@Getter
@AllArgsConstructor
private static class Author{
private Long id;
private String nickname;
}
}

0 comments on commit 45ec520

Please sign in to comment.