Skip to content

Conversation

@Seolock
Copy link

@Seolock Seolock commented Jan 22, 2025

No description provided.

Copy link

@7SH7 7SH7 left a comment

Choose a reason for hiding this comment

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

  1. 풀더명은 소문자로 해주세요.
  2. dto에 request, response를 다 넣어도 되지만, request와 response는 controller에서 사용하기 때문에, controller에 넣어서 관리하길 추천드립니다. (병주님이 편하다면, 기존대로 dto에 넣으셔도 무방합니다.)
  3. Response, Request를 만들어서 처리하는 것에 일관성을 두시고 코딩하기를 추천드립니다.

.build();
}

public void returnLoan() {
Copy link

Choose a reason for hiding this comment

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

이런 식으로 domain의 값들을 변경하게 하는 것들은 domain에서 선언해서 처리해주는 것이 좋습니다.
(domain의 값 변화 관련 함수는 domain 해당 파일에 선언해주는 것이 좋음.)



@PostMapping("/books/{bookId}/checkout")
public ResponseEntity<String> checkoutBook(@PathVariable long bookId, @RequestBody LoanRequest loanRequest) {
Copy link

Choose a reason for hiding this comment

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

반환 type은 String 이렇게 말고 Response 형태로 만들어서 보내주세요! (통일성을 위해서)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants