diff --git a/src/main/java/slvtwn/khu/toyouserver/dto/RollingPaperResponse.java b/src/main/java/slvtwn/khu/toyouserver/dto/RollingPaperResponse.java index 60c1fb6..7702dfc 100644 --- a/src/main/java/slvtwn/khu/toyouserver/dto/RollingPaperResponse.java +++ b/src/main/java/slvtwn/khu/toyouserver/dto/RollingPaperResponse.java @@ -2,17 +2,16 @@ import java.util.List; import slvtwn.khu.toyouserver.domain.RollingPaper; -import slvtwn.khu.toyouserver.domain.Sticker; -public record RollingPaperResponse(String coverImageUrl, String title, String content, Long themeId, +public record RollingPaperResponse(Long id, String coverImageUrl, String title, String content, Long themeId, List stickers) { - public static RollingPaperResponse from(RollingPaper rollingPaper) { - List stickerResponses = rollingPaper.getStickers().stream() - .map(StickerResponse::from) - .toList(); + public static RollingPaperResponse from(RollingPaper rollingPaper) { + List stickerResponses = rollingPaper.getStickers().stream() + .map(StickerResponse::from) + .toList(); - return new RollingPaperResponse(rollingPaper.getCoverImageUrl(), rollingPaper.getTitle(), - rollingPaper.getContent(), rollingPaper.getThemeId(), stickerResponses); - } + return new RollingPaperResponse(rollingPaper.getId(), rollingPaper.getCoverImageUrl(), rollingPaper.getTitle(), + rollingPaper.getContent(), rollingPaper.getThemeId(), stickerResponses); + } }