Merged
Conversation
- 리뷰 모듈 생성 - 복습 일정 생성 로직 작성 - 오늘 복습 일정인 문제들 정보 반환하는 로직 작성
- 디스코드 인프라와 관련된 부분 제외
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔗 관련 이슈
resolves #21
📝 작업 내용
디스코드봇의 구현세부사항과 관련없는 비지니스로직 부분을 먼저 작성하였습니다.
오늘 복습할 문제 계산 로직
문제 풀이 후 다음 복습 스케쥴 작성 로직
"디스코드 메시지 구성 및 전송 로직"을 제외한
ReviewScheduler구현서비스 및 다른 파일에 같이 있던 타입들을 타입파일로 이동시켰습니다.
createdAt,reviewDate를 생성시 한번 만들고 그 후 업데이트 안하게 entity를 수정하였습니다.🍇 고민한 부분
현재 복습 문제를 전송할 때 필요한 데이터(
문제,복습 스케줄 정보,채널 정보)를 데이터를 한 번에 조회할지, 혹은 별도로 가져와 애플리케이션 레이어에서 조합할지에 대한 고민이 있었습니다.단일 쿼리로 모든 데이터를 가져오는 방식은 재사용성이 떨어지고, 특정 데이터 구조에 강하게 결합되어 별도로 가져와 조합하는 방식을 선택했습니다. populate 기능을 활용하여
문제 및 복습 스케줄을 한 번에 조회하고,채널 정보는 별도의 쿼리에서 가져와 애플리케이션 레이어에서 조합하는 방식을 선택했습니다. (populate 기능은 JOIN을 활용하여 한 번의 쿼리로 관련 데이터를 가져오므로, N+1 문제가 일어나지 않습니다.)