-
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 #479 from team-yello/develop
[feat] 댓글 게시글 추가
- Loading branch information
Showing
34 changed files
with
564 additions
and
288 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 was deleted.
Oops, something went wrong.
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
28 changes: 0 additions & 28 deletions
28
src/main/java/com/yello/server/domain/pay/controller/PayController.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/main/java/com/yello/server/domain/pay/dto/request/PayCountRequest.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/main/java/com/yello/server/domain/pay/repository/PayJpaRepository.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/main/java/com/yello/server/domain/pay/repository/PayRepository.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/main/java/com/yello/server/domain/pay/repository/PayRepositoryImpl.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
src/main/java/com/yello/server/domain/pay/service/PayService.java
This file was deleted.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/yello/server/domain/user/dto/request/UserPostCommentUpdateRequest.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,16 @@ | ||
package com.yello.server.domain.user.dto.request; | ||
|
||
import jakarta.annotation.Nullable; | ||
|
||
public record UserPostCommentUpdateRequest( | ||
@Nullable Long id, | ||
Long postId, | ||
String userName, | ||
String yelloId, | ||
String status, | ||
String title, | ||
String subtitle, | ||
String content | ||
) { | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/yello/server/domain/user/dto/response/UserPostCommentResponse.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,13 @@ | ||
package com.yello.server.domain.user.dto.response; | ||
|
||
import java.util.List; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record UserPostCommentResponse( | ||
Long pageCount, | ||
Long totalCount, | ||
List<UserPostCommentVO> postCommentList | ||
) { | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/com/yello/server/domain/user/dto/response/UserPostCommentVO.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 com.yello.server.domain.user.dto.response; | ||
|
||
import com.yello.server.domain.user.entity.User; | ||
import com.yello.server.domain.user.entity.UserPost; | ||
import com.yello.server.domain.user.entity.UserPostComment; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record UserPostCommentVO( | ||
Long id, | ||
Long userPostId, | ||
Long userId, | ||
String status, | ||
String userName, | ||
String yelloId, | ||
String title, | ||
String subtitle, | ||
String content, | ||
String createdAt, | ||
String updatedAt | ||
) { | ||
|
||
public static UserPostCommentVO of(UserPostComment userPostComment) { | ||
UserPost userPost = userPostComment.getUserPost(); | ||
User user = userPostComment.getUser(); | ||
return UserPostCommentVO.builder() | ||
.id(userPostComment.getId()) | ||
.userPostId(userPost == null ? null : userPost.getId()) | ||
.userId(user == null ? null : user.getId()) | ||
.status(userPostComment.getStatus().getInitial()) | ||
.userName(userPostComment.getUserName()) | ||
.yelloId(userPostComment.getYelloId()) | ||
.title(userPostComment.getTitle()) | ||
.subtitle(userPostComment.getSubtitle()) | ||
.content(userPostComment.getContent()) | ||
.createdAt(String.valueOf(userPostComment.getCreatedAt())) | ||
.updatedAt(String.valueOf(userPostComment.getUpdatedAt())) | ||
.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
Oops, something went wrong.