-
Notifications
You must be signed in to change notification settings - Fork 0
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
update: Updated core entities #98
Conversation
koreanMike513
commented
Feb 4, 2025
- core 엔티티들의 필드들을 필요에 업데이트 하였습니다.
- food 엔티티의 경우에는 Unit test를 추가로 작성했습니다.
private RoundingMode roundingMode; | ||
|
||
@PrePersist |
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.
더 간단하게 default값을 설정하는 방법은 없을까요?
@@ -51,6 +55,14 @@ public class Food extends BaseEntity { | |||
@JoinColumn(name = "currency_id") | |||
private Currency currency; | |||
|
|||
private Double rate; |
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.
BigDecimal이 아닌 이유가 있을까요?
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.
평점에 관련된 로직은 정확성이 BigDecimal을 사용할 정도로 정확하지는 않아도 된다고 생각하여 이렇게 적었습니다. 수정하겠습니다.
this.collectionEndTime = collectionEndTime; | ||
} | ||
|
||
public List<String> getTags() { |
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.
처음부터 리스트가 아닌 String으로 저장하는 이유가 궁금합니다.
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.
sql 에서 저장될 때 배열로 저장되기 보다는 String으로 저장되는게 sql 에서 저장하고 꺼내올 때 performance 적으로 나을 수 있겠다고 생각하여 이렇게 진행하였습니다. 우선 list로 바꾸고 실제로 나가는 sql query 와 performance 비교를 통해서 추후에 다시 생각해보도록 하겠습니다.
HCP Terraform Plan Output
|