-
Notifications
You must be signed in to change notification settings - Fork 2
SISC-BE-부모게시판 목록 조회 #123
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
The head ref may contain hidden characters: "SIsC1-151-BE-\uAC8C\uC2DC\uD310-\uCD94\uAC00"
Merged
SISC-BE-부모게시판 목록 조회 #123
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6d6db75
[BE][FEAT]게시판 생성 API
nayoung04 d4eec68
[BE][FEAT]대댓글 기능 추가
nayoung04 5f03a8e
[BE][FIX]게시판 테스트 코드 수정
nayoung04 5ed7c8e
[BE][FIX]리뷰 반영
nayoung04 2ed86c8
[BE][FEAT]부모 게시판 목록 조회
nayoung04 8deff33
[BE][FEAT]부모 게시판 목록 조회
nayoung04 a044291
[BE][FEAT]부모 게시판 목록 조회
nayoung04 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
37 changes: 37 additions & 0 deletions
37
backend/src/main/java/org/sejongisc/backend/board/dto/BoardResponse.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,37 @@ | ||
| package org.sejongisc.backend.board.dto; | ||
|
|
||
| import java.util.UUID; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
| import lombok.ToString; | ||
| import org.sejongisc.backend.board.entity.Board; | ||
| import org.sejongisc.backend.user.entity.User; | ||
|
|
||
| @ToString | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| @Builder | ||
| public class BoardResponse { | ||
|
|
||
| private UUID boardId; | ||
|
|
||
| private String boardName; | ||
|
|
||
| private User createdBy; | ||
|
|
||
| private UUID parentBoardId; | ||
|
|
||
| public static BoardResponse of(Board board) { | ||
| return BoardResponse.builder() | ||
| .boardId(board.getBoardId()) | ||
| .boardName(board.getBoardName()) | ||
| .createdBy(board.getCreatedBy()) | ||
| .parentBoardId(board.getParentBoard() != null ? board.getParentBoard().getBoardId() : null) | ||
| .build(); | ||
| } | ||
| } |
2 changes: 2 additions & 0 deletions
2
backend/src/main/java/org/sejongisc/backend/board/repository/BoardRepository.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,9 +1,11 @@ | ||
| package org.sejongisc.backend.board.repository; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
| import org.sejongisc.backend.board.entity.Board; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface BoardRepository extends JpaRepository<Board, UUID> { | ||
|
|
||
| List<Board> findAllByParentBoardIsNull(); | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.