-
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.
Merge pull request #138 from MEME-UMC/chore/#136_tmp
[Chore] Reservation, Review 상세 정보 수정
- Loading branch information
Showing
14 changed files
with
283 additions
and
25 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
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
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
48 changes: 48 additions & 0 deletions
48
src/main/java/umc/meme/shop/domain/reservation/dto/response/ArtistReservationDetailDto.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,48 @@ | ||
package umc.meme.shop.domain.reservation.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.model.entity.Model; | ||
import umc.meme.shop.domain.reservation.entity.Reservation; | ||
import umc.meme.shop.global.enums.*; | ||
|
||
import java.util.Date; | ||
|
||
@Getter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class ArtistReservationDetailDto { | ||
private Long reservationId; | ||
//모델 정보 | ||
private String modelNickName; | ||
private String modelProfileImg; | ||
private Gender gender; | ||
private SkinType skinType; | ||
private PersonalColor personalColor; | ||
//예약 정보 | ||
private String portfolioName; | ||
private Date date; | ||
// private DayOfWeek dayOfWeek; | ||
// private Times times; | ||
private String location; | ||
|
||
public static ArtistReservationDetailDto from(Reservation reservation, Model model){ | ||
return ArtistReservationDetailDto.builder() | ||
.reservationId(reservation.getReservationId()) | ||
.modelNickName(model.getNickname()) | ||
.modelProfileImg(model.getProfileImg()) | ||
.gender(model.getGender()) | ||
.skinType(model.getSkinType()) | ||
.personalColor(model.getPersonalColor()) | ||
.portfolioName(reservation.getPortfolio().getMakeupName()) | ||
.date(reservation.getReservationDate()) | ||
// .dayOfWeek(reservation.getReservationDayOfWeekAndTime()) | ||
// .times(reservation.getAvailableTime().getTimes()) | ||
.location(reservation.getLocation()) | ||
.build(); | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/umc/meme/shop/domain/reservation/dto/response/ModelReservationDetailDto.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.reservation.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.artist.entity.Artist; | ||
import umc.meme.shop.domain.portfolio.entity.Portfolio; | ||
import umc.meme.shop.domain.reservation.entity.Reservation; | ||
import umc.meme.shop.global.enums.Category; | ||
|
||
@Getter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class ModelReservationDetailDto { | ||
private Long reservationId; | ||
//아티스트 정보 | ||
private String artistNickName; | ||
private String artistProfileImg; | ||
//예약 정보 | ||
private String portfolioName; | ||
private Category category; | ||
private String location; | ||
//TODO: Portfolio 관련 정보 추가논의 | ||
|
||
public static ModelReservationDetailDto from(Reservation reservation){ | ||
Portfolio portfolio = reservation.getPortfolio(); | ||
Artist artist = portfolio.getArtist(); | ||
return ModelReservationDetailDto.builder() | ||
.reservationId(reservation.getReservationId()) | ||
.artistNickName(artist.getNickname()) | ||
.artistProfileImg(artist.getProfileImg()) | ||
.portfolioName(portfolio.getMakeupName()) | ||
.category(portfolio.getCategory()) | ||
.location(reservation.getLocation()) | ||
.build(); | ||
} | ||
|
||
} |
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
31 changes: 31 additions & 0 deletions
31
src/main/java/umc/meme/shop/domain/review/dto/response/MyReviewResponseDto.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,31 @@ | ||
package umc.meme.shop.domain.review.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.review.entity.Review; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class MyReviewResponseDto { | ||
private Long reviewId; | ||
private String artistNickName; | ||
private String portfolioImg; | ||
private String location; //장소 | ||
private LocalDateTime createdAt; | ||
|
||
public static MyReviewResponseDto from(Review review){ | ||
return MyReviewResponseDto.builder() | ||
.reviewId(review.getReviewId()) | ||
.artistNickName(review.getPortfolio().getArtist().getNickname()) | ||
.portfolioImg(review.getPortfolio().getPortfolioImgList().get(0).getSrc()) //첫 번째 포트폴리오 이미지 | ||
.location(review.getPortfolio().getArtist().getShopLocation()) | ||
.createdAt(review.getCreatedAt()) | ||
.build(); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/umc/meme/shop/domain/review/dto/response/ReviewAvailableListDto.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,35 @@ | ||
package umc.meme.shop.domain.review.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.reservation.entity.Reservation; | ||
|
||
import java.util.Date; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class ReviewAvailableListDto { | ||
private Long reservationId; | ||
private Long portfolioId; | ||
private String artistNickName; | ||
private String makeupName; | ||
private String portfolioImg; | ||
private Date reservationDate; | ||
private String shopLocation; //샵 위치 | ||
|
||
public static ReviewAvailableListDto from(Reservation reservation) { | ||
return ReviewAvailableListDto.builder() | ||
.reservationId(reservation.getReservationId()) | ||
.portfolioId(reservation.getReservationId()) | ||
.artistNickName(reservation.getPortfolio().getArtist().getNickname()) | ||
.makeupName(reservation.getPortfolio().getMakeupName()) | ||
.portfolioImg(reservation.getPortfolio().getPortfolioImgList().get(0).getSrc()) | ||
.reservationDate(reservation.getReservationDate()) | ||
.shopLocation(reservation.getLocation()) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.