forked from codesquad-members-2024/issue-tracker
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- domain -> entity로 패키지명 변경 - mapping 메서드 mapper클래스에서 수행하도록 변경
- Loading branch information
1 parent
e49d7a1
commit 903f872
Showing
5 changed files
with
54 additions
and
41 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
.../issuetracker/comment/domain/Comment.java → .../issuetracker/comment/entity/Comment.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
2 changes: 1 addition & 1 deletion
2
be/issue-tracker/src/main/java/com/issuetracker/comment/repository/CommentRepository.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
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
19 changes: 19 additions & 0 deletions
19
be/issue-tracker/src/main/java/com/issuetracker/comment/util/CommentMapper.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,19 @@ | ||
package com.issuetracker.comment.util; | ||
|
||
import com.issuetracker.comment.dto.CommentDetailDto; | ||
import com.issuetracker.comment.entity.Comment; | ||
import com.issuetracker.file.dto.UploadedFileDto; | ||
import com.issuetracker.member.dto.SimpleMemberDto; | ||
|
||
public class CommentMapper { | ||
public static CommentDetailDto toCommentDetailDto(Comment comment, SimpleMemberDto writer, UploadedFileDto file) { | ||
return CommentDetailDto.builder() | ||
.id(comment.getId()) | ||
.content(comment.getContent()) | ||
.writer(writer) | ||
.isWriter(comment.isWriter()) | ||
.file(file) | ||
.createDate(comment.getCreateDate()) | ||
.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