-
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 #18 from TeamUStory/feat/recommend
fix:추천 페이퍼 디테일에서 상호명 추가
- Loading branch information
Showing
4 changed files
with
60 additions
and
30 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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/elice/ustory/domain/recommand/dto/RecommendPaperDTO.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,33 @@ | ||
package com.elice.ustory.domain.recommand.dto; | ||
|
||
import com.elice.ustory.domain.paper.entity.Paper; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RecommendPaperDTO { | ||
|
||
@Schema(description = "상호명", example = "진양면옥") | ||
private String paperTitle; | ||
|
||
@Schema(description = "좋아요 수", example = "1") | ||
private int countGreat; | ||
|
||
@Schema(description = "썸네일 이미지", example = "https://~~~~~~") | ||
private String imgUrl; | ||
|
||
@Schema(description = "페이퍼 이미지", example = "1") | ||
private long paperId; | ||
|
||
public RecommendPaperDTO(Paper paper) { | ||
this.paperTitle = paper.getTitle(); | ||
this.imgUrl = paper.getThumbnailImageUrl(); | ||
this.paperId = paper.getId(); | ||
} | ||
} |
23 changes: 4 additions & 19 deletions
23
src/main/java/com/elice/ustory/domain/recommand/dto/RecommendPaperResponse.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 |
---|---|---|
@@ -1,33 +1,18 @@ | ||
package com.elice.ustory.domain.recommand.dto; | ||
|
||
import com.elice.ustory.domain.paper.entity.Paper; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RecommendPaperResponse { | ||
|
||
@Schema(description = "상호명", example = "진양면옥") | ||
private String paperTitle; | ||
|
||
@Schema(description = "좋아요 수", example = "1") | ||
private int countGreat; | ||
|
||
@Schema(description = "썸네일 이미지", example = "https://~~~~~~") | ||
private String imgUrl; | ||
private String store; | ||
|
||
@Schema(description = "페이퍼 이미지", example = "1") | ||
private long paperId; | ||
private List<RecommendPaperDTO> recommendPaper; | ||
|
||
public RecommendPaperResponse(Paper paper) { | ||
this.paperTitle = paper.getTitle(); | ||
this.imgUrl = paper.getThumbnailImageUrl(); | ||
this.paperId = paper.getId(); | ||
} | ||
} |