-
Notifications
You must be signed in to change notification settings - Fork 1
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: Dto 설정, FeelingPostController 생성 -#10 #11
Conversation
|
||
@GetMapping("/") | ||
public String home() { | ||
return "home"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 왜 있는건가요? 저희는 REST API여서 이런 API는 사용하지 않습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 넵 수정하겠습니다!
private ClinicPost clinicPost; | ||
|
||
@Builder | ||
public ClinicHeart() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빈 생성자를 만드셨는데 ClinicHeart가 생성될때 user와 clinicpost 값을 받아야 하므로 두 필드를 받는 생성자를 만드셔야 합니다.
@builder
public ClinicHeart(User user, ClinicPost clinicPost) {
this.user = user;
this.clinicPost = clinicPost;
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 넵!! 클리닉부분에 살짝 미스가 났습니다 바로 수정하겠습니다!
|
||
// 삭제 여부 T:삭제 F:삭제X | ||
@Column(nullable = false) | ||
private char delFlag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DB에서는 String으로 보여지는게 맞지만 어플리케이션 내 객체로는 boolean이 맞습니다. JPA가 DB에 종속적이지 않은 객체 중심 개발을 위해 만들어진 것이므로 Boolean으로 사용하시는게 좋을 것 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 슬랙에 올려주신 것 참고하여 수정했습니다 감사합니다 :)
|
||
// 3. FeelingPost : FeelingHeart = 1 : n | ||
@OneToMany(mappedBy = "feelingPost") | ||
private List<FeelingHeart> feelingHearts = new ArrayList<FeelingHeart>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new ArrayList<>(); 로 <>안의 제네릭을 생략할 수 있습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵!! 바로 수정하여 pr 보내겠습니다
feat: Dto 설정, FeelingPostController 생성 -#10
변경 사항
+ 이 PR 도중에 db 관련 답을 받았습니다..! 이 부분은 한꺼번에 수정하여 올리겠습니다
closed #10