[IC2_BE] 신용진 - 설문조사 서비스 과제#16
Open
sirin0762 wants to merge 27 commits into
Open
Conversation
도메인 객체와 엔티티 객체를 분리하는 방향으로 설계를 진행하였습니다. 목표는 JPA와의 결합도를 낮추는 것으로, 이번 프로젝트에서는 JPA는 그저 DB CRUD 정도를 수행하는 정도로 사용할 예정입니다. 설문조사 객체(Survey) 를 보시면, 설문항목(Question)에 의존하고 있으나 Jpa Entity에서는 그렇지 않은 모습을 보이고 있습니다. 설문조사 객체는 설문항목을 최대 10개만 가질 수 있다는 제약을 가지고 있기에 이를 위해 Quesiton을 가지고 있으나, 설문항목 엔티티는 CRUD만 진행하기에 굳이 설문항목을 알 필요가 없다고 판단하여 다음과 같이 설게하였습니다.
설문조사 생성에 대한 비즈니스 로직을 구현하였습니다. 주요 도메인은 하기와 같으며, 도메인 객체와 JPA Entity를 분리하는 방향으로 설계를 진행했습니다. [주요도메인] - Survey : 설문조사 - Question : 설문항목 - Answer : 설문항목에 대한 답
QuestionEntity는 AnswerEntity에 의존하게 변경 AS-IS : QuestionEntity -> Answer TO-BE : QuestionEntity -> AnswerEntity
AS-IS : Long id 단독키 To-be : Long id, int version으로 복합키 설정 및 GenerateValue 삭제
As-is : ShortAnswer, LongAnswer To-be: Text, Paragraph
surveyItem 조회 메서드에 surveyId로 파라미터로 입력되게 변경
Author
기능명세서
응답 데이터 예시설문 생성 후 조회 응답설문 수정 후 조회 응답설문 제출 후 조회 응답설문 응답 전체 조회 응답고민포인트
|
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.
2024-11-29 리뷰완료