-
Notifications
You must be signed in to change notification settings - Fork 2
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 #66 from LIKELION-TEAM4-HACKATHON/feature/save-review
후기 저장 기능
- Loading branch information
Showing
6 changed files
with
208 additions
and
5 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
24 changes: 24 additions & 0 deletions
24
src/main/java/likelion/MZConnent/dto/review/request/SaveReviewRequest.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,24 @@ | ||
package likelion.MZConnent.dto.review.request; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.util.List; | ||
|
||
@Slf4j | ||
@Getter | ||
@NoArgsConstructor | ||
public class SaveReviewRequest { | ||
private String title; | ||
private String content; | ||
|
||
@Builder | ||
public SaveReviewRequest(String title, String content, List<String> reviewImageUrls) { | ||
this.title = title; | ||
this.content = content; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
src/main/java/likelion/MZConnent/dto/review/response/SaveReviewResponse.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,68 @@ | ||
package likelion.MZConnent.dto.review.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Slf4j | ||
@Getter | ||
@NoArgsConstructor | ||
public class SaveReviewResponse { | ||
private Long reviewId; | ||
private ReviewerDto reviewer; | ||
private CultureDto culture; | ||
private String title; | ||
private String reviewImageUrl1; | ||
private String reviewImageUrl2; | ||
private String reviewImageUrl3; | ||
private String reviewImageUrl4; | ||
private LocalDateTime createdDate; | ||
private int likeCount; | ||
|
||
@Builder | ||
public SaveReviewResponse(Long reviewId, ReviewerDto reviewer, CultureDto culture, String title, String reviewImageUrl1, String reviewImageUrl2, String reviewImageUrl3, String reviewImageUrl4, LocalDateTime createdDate, int likeCount) { | ||
this.reviewId = reviewId; | ||
this.reviewer = reviewer; | ||
this.culture = culture; | ||
this.title = title; | ||
this.reviewImageUrl1 = reviewImageUrl1; | ||
this.reviewImageUrl2 = reviewImageUrl2; | ||
this.reviewImageUrl3 = reviewImageUrl3; | ||
this.reviewImageUrl4 = reviewImageUrl4; | ||
this.createdDate = createdDate; | ||
this.likeCount = likeCount; | ||
} | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public static class ReviewerDto { | ||
private Long userId; | ||
private String username; | ||
private String profileImage; | ||
|
||
@Builder | ||
public ReviewerDto(Long userId, String username, String profileImage) { | ||
this.userId = userId; | ||
this.username = username; | ||
this.profileImage = profileImage; | ||
} | ||
} | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public static class CultureDto { | ||
private Long cultureId; | ||
private String cultureName; | ||
|
||
@Builder | ||
public CultureDto(Long cultureId, String cultureName) { | ||
this.cultureId = cultureId; | ||
this.cultureName = cultureName; | ||
} | ||
} | ||
|
||
} |
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