-
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 basic domains #18
update: Updated basic domains #18
Conversation
koreanMike513
commented
Dec 23, 2024
- import 문 수정 후
- 조금 더 필요한 필드나 메서드에 한해서 entity class에 추가 했습니다.
- added more fields and methods to domain classes - fixed import statements (from * to individual import)
return food; | ||
} | ||
|
||
public BigDecimal calculateCost(int quantity) { | ||
return BigDecimal.valueOf((long) price.intValue() * quantity); |
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.
price.intValue()가 의도하신게 맞는지 확인 부탁드립니다.
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 에 multiply() 메서드가 있는것을 확인하였습니다 수정하겠습니다.
- applied multiply() method instead type manual castings
@Enumerated(EnumType.STRING) | ||
private OrderStatus status; | ||
|
||
@OneToOne(fetch = LAZY) | ||
@JoinColumn(name = "payment_id") | ||
private Payment payment; | ||
|
||
public void updateTotalCost(BigDecimal totalCost) { |
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.
totalCost, updateTotalCost, calculateTotalCost 중 필요한 것만 노출 고려