Skip to content

Commit

Permalink
[refactor] 분실물 게시물 단건 조회 시 학생의 학번도 반환 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chahyunsoo committed Oct 28, 2024
1 parent 9ad23e4 commit db17186
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

@Getter
public class LostPostDetailResponse extends PostDetailResDto{
private final String studentId;
private final List<FileResponse> fileResponseList;

@Builder
private LostPostDetailResponse(Long postId, String categoryName, String authorName, String title, String content, String createdAt, String lastEditedAt, Boolean isAuthor,
List<FileResponse> fileResponseList, List<String> canAuthority) {
List<FileResponse> fileResponseList, List<String> canAuthority, String studentId) {
super(postId, categoryName, authorName, title, content, createdAt, lastEditedAt, isAuthor, canAuthority);
this.studentId = studentId;
this.fileResponseList = fileResponseList;
}

Expand All @@ -29,6 +31,7 @@ public static LostPostDetailResponse of(Post post, Boolean isAuthor, User user,
.createdAt(post.getCreatedAt())
.lastEditedAt(post.getLastEditedAt())
.isAuthor(isAuthor)
.studentId(user.getStudentId())
.fileResponseList(fileResponseList)
.build();
}
Expand Down

0 comments on commit db17186

Please sign in to comment.