-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 리뷰 요청 dto 수정 * refactor: 리뷰 콘텐츠 생성 시, 리뷰에 자신을 추가하도록 변경 * feat: QuestionRepository 추가 * feat: 리뷰 작성 기능 추가 * test: 리뷰 작성 테스트 추가 * refactor: ReviewGroup 생성 시, GithubIdReviewerGroup도 같이 저장되도록 변경 * refactor: GithubId equals 및 hashcode 재정의 * refactor: review 생성 시, reviewGroup이 null이 아니도록 변경 * refactor: EqualsAndHashCode에 id 명시 * refactor: reviewee를 reviewerGroup 통해서 받아오도록 변경 * refactor: 파라미터 long 타입으로 변경 * test: 사용하지 않는 변수 제거 * test: 파라미터별로 개행하도록 변경 * refactor: ReviewerGroupGithubIds의 reviewerGithubIds를 CascadeType.PERSIST로 변경 * chore: 다른 작업에서 진행될 사항으로 사용하지 않는 테스트 삭제
- Loading branch information
Showing
11 changed files
with
97 additions
and
159 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 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
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
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
10 changes: 10 additions & 0 deletions
10
backend/src/main/java/reviewme/review/exception/QuestionNotFoundException.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,10 @@ | ||
package reviewme.review.exception; | ||
|
||
import reviewme.global.exception.NotFoundException; | ||
|
||
public class QuestionNotFoundException extends NotFoundException { | ||
|
||
public QuestionNotFoundException() { | ||
super("질문이 존재하지 않습니다."); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/reviewme/review/repository/QuestionRepository.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,14 @@ | ||
package reviewme.review.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
import reviewme.review.domain.Question; | ||
import reviewme.review.exception.QuestionNotFoundException; | ||
|
||
@Repository | ||
public interface QuestionRepository extends JpaRepository<Question, Long> { | ||
|
||
default Question getQuestionById(long id) { | ||
return findById(id).orElseThrow(QuestionNotFoundException::new); | ||
} | ||
} |
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
34 changes: 0 additions & 34 deletions
34
backend/src/test/java/reviewme/review/domain/ReviewContentTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.