-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Add] 관심 포트폴리오/아티스트 dto
- Loading branch information
Showing
7 changed files
with
127 additions
and
10 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
21 changes: 21 additions & 0 deletions
21
src/main/java/umc/meme/shop/domain/favorite/dto/response/FavoriteArtistPageResponseDto.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,21 @@ | ||
package umc.meme.shop.domain.favorite.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.favorite.entity.FavoriteArtist; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class FavoriteArtistPageResponseDto { | ||
private List<FavoriteArtistResponseDto> content; | ||
private int currentPage; //현재 페이지 번호 | ||
private int pageSize; //페이지 크기 | ||
private int totalNumber; //전체 메이크업 개수 | ||
private int totalPage; //전체 페이지 개수 | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/umc/meme/shop/domain/favorite/dto/response/FavoriteArtistResponseDto.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,29 @@ | ||
package umc.meme.shop.domain.favorite.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.artist.entity.Artist; | ||
import umc.meme.shop.domain.favorite.entity.FavoriteArtist; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class FavoriteArtistResponseDto { | ||
private Long artistId; | ||
private String profileImg; | ||
private String artistNickName; | ||
|
||
public static FavoriteArtistResponseDto from(FavoriteArtist favoriteArtist) { | ||
|
||
Artist artist = favoriteArtist.getArtist(); | ||
|
||
return FavoriteArtistResponseDto.builder() | ||
.artistId(artist.getArtistId()) | ||
.profileImg(artist.getProfileImg()) | ||
.artistNickName(artist.getNickname()) | ||
.build(); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/umc/meme/shop/domain/favorite/dto/response/FavoritePortfolioResponseDto.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,40 @@ | ||
package umc.meme.shop.domain.favorite.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.artist.entity.Artist; | ||
import umc.meme.shop.domain.favorite.entity.FavoritePortfolio; | ||
import umc.meme.shop.domain.portfolio.dto.response.PortfolioDto; | ||
import umc.meme.shop.domain.portfolio.entity.Portfolio; | ||
import umc.meme.shop.domain.portfolio.entity.PortfolioImg; | ||
import umc.meme.shop.domain.portfolio.entity.enums.Category; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class FavoritePortfolioResponseDto { | ||
private Long portfolioId; | ||
private String portfolioImg; | ||
private Category category; | ||
private String makeupName; | ||
private int price; | ||
|
||
public static FavoritePortfolioResponseDto from(FavoritePortfolio favoritePortfolio) { | ||
|
||
Portfolio portfolio = favoritePortfolio.getPortfolio(); | ||
|
||
return FavoritePortfolioResponseDto.builder() | ||
.portfolioId(portfolio.getPortfolioId()) | ||
.portfolioImg(portfolio.getPortfolioImgList().get(0).getSrc()) | ||
.category(portfolio.getCategory()) | ||
.makeupName(portfolio.getMakeupName()) | ||
.price(portfolio.getPrice()) | ||
.build(); | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ain/java/umc/meme/shop/domain/favorite/dto/response/FavoritePortfolioResponsePageDto.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,20 @@ | ||
package umc.meme.shop.domain.favorite.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class FavoritePortfolioResponsePageDto { | ||
private List<FavoritePortfolioResponseDto> content; | ||
private int currentPage; //현재 페이지 번호 | ||
private int pageSize; //페이지 크기 | ||
private int totalNumber; //전체 메이크업 개수 | ||
private int totalPage; //전체 페이지 개수 | ||
} |
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