Skip to content
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

[feat] Answer, Question CRUD 로직 구현 #19

Closed
wants to merge 7 commits into from
Closed

[feat] Answer, Question CRUD 로직 구현 #19

wants to merge 7 commits into from

Conversation

minwoo0419
Copy link
Contributor

@minwoo0419 minwoo0419 commented May 19, 2024

Related issue 🛠

Work Description ✏️

  • Answer CRUD 구현
    • create, read, update 구현
  • Question CRUD 구현
    • create, read 구현
  • Answer, Question Domain Test 구현

Uncompleted Tasks 😅

To Reviewers 📢

  • Service Test를 진행하려했는데 모두 repository 기본 기능들만 return해주므로 하지 않았습니다.

Copy link
Contributor

@kmjenny kmjenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 잘 참고할게요..._〆(。。)

Copy link
Contributor

@tkdwns414 tkdwns414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인 부탁드립니다. 혹시 컨트롤러 쪽은 이후 이슈로 하시는걸까요?

Comment on lines 16 to 20
public String create(AnswerCreateDto answerCreateDto, Question question, Profile profile){
Answer answer = Answer.create(answerCreateDto, question, profile);
answerRepository.save(answer);
return answer.getId().toString();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create 안에 return answerRepository.save(answer)만 남기는건 어떤가요? 저희가 Service를 CRUD로 나누려고 했던 것은 Repository와 Service에서 순환 참조가 일어나지 않도록 핵심 기능을 분리한느것이였기 때문에 안에는 Repository의 기본 메소드만 남아있는 것이 맞을 것 같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 지적이네요! 수정하는 게 좋을것같아요 수정하겠습니다

Comment on lines 14 to 18
public String create(String content, Profile profile){
Question question = Question.create(content, profile);
questionRepository.save(question);
return question.getId().toString();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앞선 리뷰와 마찬가지입니다

@minwoo0419
Copy link
Contributor Author

확인 부탁드립니다. 혹시 컨트롤러 쪽은 이후 이슈로 하시는걸까요?

네 컨트롤러랑 서비스레이어쪽은 추후에 다른 헬퍼들이 만들어졌을때 하는 게 좋을 것 같아서 따로 구현했습니다.

@minwoo0419 minwoo0419 closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Answer, Question Helper 구현
3 participants