-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
538 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## 깃 컨벤션 | ||
|
||
- feat: 새로운 기능 추가 | ||
- fix: 버그 수정 | ||
- docs: 문서 수정 | ||
- style: 코드 스타일 변경 (코드 포매팅, 세미콜론 누락 등) | ||
- design: 사용자 UI 디자인 변경 (CSS 등) | ||
- test: 테스트 코드, 리팩토링 (Test Code) | ||
- refactor: 리팩토링 (Production Code) | ||
- build: 빌드 파일 수정 | ||
- ci: CI 설정 파일 수정 | ||
- perf: 성능 개선 | ||
- chore: 자잘한 수정이나 빌드 업데이트 | ||
- rename: 파일 혹은 폴더명을 수정만 한 경우 | ||
- remove: 파일을 삭제만 한 경우 |
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
Submodule secret
updated
from 8cb2d2 to f9aa86
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
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/in/backend/core/auth/infrastrcutrue/RefreshTokenRepository.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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package in.backend.core.auth.infrastrcutrue; | ||
|
||
import in.backend.core.auth.entity.RefreshTokenEntity; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface RefreshTokenRepository extends JpaRepository<RefreshTokenEntity, Long> { | ||
|
||
Optional<RefreshTokenEntity> findByToken(String refreshToken); | ||
} |
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
12 changes: 12 additions & 0 deletions
12
backend/src/main/java/in/backend/core/question/application/QuestionSaveCommand.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,12 @@ | ||
package in.backend.core.question.application; | ||
|
||
import in.backend.global.entity.ActionType; | ||
|
||
public record QuestionSaveCommand( | ||
ActionType action, | ||
Long questionId, | ||
Long questionSetId, | ||
Integer sequence, | ||
String question | ||
) { | ||
} |
21 changes: 21 additions & 0 deletions
21
backend/src/main/java/in/backend/core/question/application/QuestionService.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,21 @@ | ||
package in.backend.core.question.application; | ||
|
||
|
||
import in.backend.core.question.application.QuestionWriter.QuestionInfo; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class QuestionService { | ||
private final QuestionWriter questionWriter; | ||
|
||
public Long save(QuestionSaveCommand command) { | ||
return switch (command.action()) { | ||
case CREATE -> questionWriter.write(new QuestionInfo(command)); | ||
case UPDATE -> questionWriter.write(command.questionId(), new QuestionInfo(command)); | ||
case DELETE -> throw new UnsupportedOperationException(); | ||
}; | ||
} | ||
|
||
} |
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
26 changes: 26 additions & 0 deletions
26
backend/src/main/java/in/backend/core/question/presentation/QuestionApi.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,26 @@ | ||
package in.backend.core.question.presentation; | ||
|
||
|
||
import in.backend.core.auth.domain.Visitor; | ||
import in.backend.core.auth.domain.attributes.Auth; | ||
import in.backend.core.question.presentation.payload.QuestionSaveRequest; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/questions") | ||
public class QuestionApi { | ||
|
||
|
||
@PostMapping | ||
public void save( | ||
@RequestBody QuestionSaveRequest questionSaveRequest, | ||
@Auth Visitor visitor | ||
) { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...d/src/main/java/in/backend/core/question/presentation/payload/QuestionDetailResponse.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,9 @@ | ||
package in.backend.core.question.presentation.payload; | ||
|
||
public record QuestionDetailResponse( | ||
Long questionId, | ||
Long questionSetId, | ||
String question, | ||
Integer sequence | ||
) { | ||
} |
12 changes: 12 additions & 0 deletions
12
backend/src/main/java/in/backend/core/question/presentation/payload/QuestionSaveRequest.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,12 @@ | ||
package in.backend.core.question.presentation.payload; | ||
|
||
import in.backend.global.entity.ActionType; | ||
|
||
public record QuestionSaveRequest( | ||
ActionType action, | ||
Long questionId, | ||
Long questionSetId, | ||
Integer sequence, | ||
String question | ||
) { | ||
} |
16 changes: 16 additions & 0 deletions
16
backend/src/main/java/in/backend/core/questionset/application/QuestionSetCreator.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 in.backend.core.questionset.application; | ||
|
||
import lombok.Builder; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
@Builder | ||
public record QuestionSetCreator( | ||
String title, | ||
String description, | ||
String thumbnailUrl, | ||
MultipartFile multipartFile, | ||
int defaultTailQuestionDepth, | ||
int defaultTimeToAnswer, | ||
int defaultTimeToThink | ||
) { | ||
} |
Oops, something went wrong.