-
Notifications
You must be signed in to change notification settings - Fork 0
[TSK-73] 어드민 공지 응답, 리뷰 조회 응답 updatedAt, createdAt 추가 #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
7 changes: 5 additions & 2 deletions
7
src/main/java/kr/allcll/backend/admin/review/dto/AdminUserReviewResponse.java
This file contains hidden or 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,21 +1,24 @@ | ||
| package kr.allcll.backend.admin.review.dto; | ||
|
|
||
| import java.time.LocalDateTime; | ||
| import kr.allcll.backend.domain.operationPeriod.OperationType; | ||
| import kr.allcll.backend.domain.review.UserReview; | ||
|
|
||
| public record AdminUserReviewResponse( | ||
| String studentId, | ||
| Short rate, | ||
| String detail, | ||
| OperationType operationType | ||
| OperationType operationType, | ||
| LocalDateTime createdAt | ||
| ) { | ||
|
|
||
| public static AdminUserReviewResponse from(UserReview userReview) { | ||
| return new AdminUserReviewResponse( | ||
| userReview.getStudentId(), | ||
| userReview.getRate(), | ||
| userReview.getDetail(), | ||
| userReview.getOperationType() | ||
| userReview.getOperationType(), | ||
| userReview.getCreatedAt() | ||
| ); | ||
| } | ||
| } | ||
9 changes: 0 additions & 9 deletions
9
src/main/java/kr/allcll/backend/admin/review/dto/AdminUserReviewResponses.java
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/main/java/kr/allcll/backend/admin/review/dto/AdminUserReviewsResponse.java
This file contains hidden or 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,17 @@ | ||
| package kr.allcll.backend.admin.review.dto; | ||
|
|
||
| import java.util.List; | ||
| import kr.allcll.backend.domain.review.UserReview; | ||
|
|
||
| public record AdminUserReviewsResponse( | ||
| List<AdminUserReviewResponse> reviews | ||
| ) { | ||
|
|
||
| public static AdminUserReviewsResponse from(List<UserReview> reviews) { | ||
| return new AdminUserReviewsResponse( | ||
| reviews.stream() | ||
| .map(AdminUserReviewResponse::from) | ||
| .toList() | ||
| ); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기에
updatedAt안써도 되나요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제 생각엔 요기는 유저가 리뷰를 수정하는 기능을 제공하지 않기 때문에 불필요한 응답 필드라고 생각함니다~!
createdAt만 있어도 충분할 것 같다고 판단되는데 어떻게 생각하시나용?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 맞아요~ 애초에 유저가 자기 리뷰를 볼 수 없고, 그래서 수정할 수도 없기 때문에 createdAt만 넣었습니다. 추후에 리뷰 확인 기능이 생기면 모를까 지금은 무의미할 것 같아서요.