-
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 #45 from Kusitms-29th-Meetup-TeamE/feat/44/experie…
…nce-detail Feat: 마이페이지 - 배움내역보기 api 구현
- Loading branch information
Showing
18 changed files
with
249 additions
and
214 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
11 changes: 3 additions & 8 deletions
11
src/main/java/com/meetup/teame/backend/domain/review/dto/request/CreateReviewReq.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,17 +1,12 @@ | ||
package com.meetup.teame.backend.domain.review.dto.request; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class CreateReviewReq { | ||
|
||
private String description; | ||
|
||
private Long mentorId; | ||
|
||
private Long menteeId; | ||
private String content; | ||
} |
53 changes: 0 additions & 53 deletions
53
src/main/java/com/meetup/teame/backend/domain/review/dto/response/MyReviewRes.java
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/main/java/com/meetup/teame/backend/domain/review/dto/response/ReadReviewsByMeRes.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,22 @@ | ||
package com.meetup.teame.backend.domain.review.dto.response; | ||
|
||
import com.meetup.teame.backend.domain.review.entity.Review; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
@Builder | ||
public class ReadReviewsByMeRes { | ||
private List<ReviewByMeRes> reviews; | ||
|
||
public static ReadReviewsByMeRes of(List<Review> reviews) { | ||
return ReadReviewsByMeRes.builder() | ||
.reviews(reviews.stream() | ||
.map(ReviewByMeRes::of) | ||
.toList()) | ||
.build(); | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
src/main/java/com/meetup/teame/backend/domain/review/dto/response/ReviewByMeRes.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,63 @@ | ||
package com.meetup.teame.backend.domain.review.dto.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.meetup.teame.backend.domain.review.entity.Review; | ||
import com.meetup.teame.backend.domain.user.entity.Gender; | ||
import lombok.*; | ||
|
||
import java.time.LocalDate; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
@Builder | ||
public class ReviewByMeRes { | ||
private Long id; | ||
|
||
private String type; | ||
|
||
private String title; | ||
|
||
private String appointmentLocation; | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd") | ||
private LocalDate appointmentDate; | ||
|
||
private String imageUrl; | ||
|
||
private String name; | ||
|
||
private Long age; | ||
|
||
private String gender; | ||
|
||
private String location; | ||
|
||
private String experienceDetail; | ||
|
||
private String review; | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd") | ||
private LocalDate reviewDate; | ||
|
||
private Boolean isWritten; | ||
|
||
public static ReviewByMeRes of(Review review) { | ||
return ReviewByMeRes.builder() | ||
.id(review.getId()) | ||
.type(review.getAppointmentType().getDescription()) | ||
.title(review.getAppointmentTitle()) | ||
.appointmentLocation(review.getAppointment().getAppointmentLocation()) | ||
.appointmentDate(review.getAppointment().getAppointmentDate()) | ||
.imageUrl(review.getMentor().getImageUrl()) | ||
.name(review.getMentor().getName()) | ||
.age(review.getMentor().getAge()) | ||
.gender(review.getMentor().getGender().getDescription()) | ||
.location(review.getMentor().getLocation()) | ||
.experienceDetail(review.getAppointmentDetail()) | ||
.review(review.getContent()) | ||
.reviewDate(review.getReviewDate()) | ||
.isWritten(review.getIsWritten()) | ||
.build(); | ||
} | ||
} |
54 changes: 0 additions & 54 deletions
54
src/main/java/com/meetup/teame/backend/domain/review/dto/response/ReviewRes.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.