Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ public class RecipeDetailResponse {
private final Long postUserId;
@Schema(description = "게시자명")
private final String postUserName;
@Schema(description = "게시자 프로필 이미지")
private final String postUserProfileImage;
@Schema(description = "신고 여부")
private final Boolean isReported;
@Schema(description = "공개 여부")
private final Boolean isHidden;

@Builder
public RecipeDetailResponse(Long recipeId, String recipeName, String introduction, String thumbnailImgUrl, Long cookingTime, String level,
List<RecipeIngredientResponse> recipeIngredients, List<RecipeProcessResponse> recipeProcesses,
Boolean isUserScrap, long scrapCnt, long viewCnt, Long postUserId, String postUserName, Boolean isReported) {
Boolean isUserScrap, long scrapCnt, long viewCnt, Long postUserId, String postUserName, String postUserProfileImage,
Boolean isReported, Boolean isHidden) {

this.recipeId = recipeId;
this.recipeName = recipeName;
Expand All @@ -60,7 +65,9 @@ public RecipeDetailResponse(Long recipeId, String recipeName, String introductio
this.viewCnt = viewCnt;
this.postUserId = postUserId;
this.postUserName = postUserName;
this.postUserProfileImage = postUserProfileImage;
this.isReported = isReported;
this.isHidden = isHidden;
}

public static RecipeDetailResponse from(Recipe recipe, boolean isUserScrap, User postUser, List<String> ingredientNamesInFridge) {
Expand All @@ -85,7 +92,9 @@ public static RecipeDetailResponse from(Recipe recipe, boolean isUserScrap, User
.viewCnt(recipe.getViewCnt())
.postUserId(postUser != null ? postUser.getUserId() : null)
.postUserName(postUser != null ? postUser.getNickname() : null)
.postUserProfileImage(postUser != null ? postUser.getProfileImgUrl() : null)
.isReported(recipe.isReported())
.isHidden(recipe.isHidden())
.build();
}
}
Loading