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

update: Updated basic domains #18

Merged
merged 2 commits into from
Dec 28, 2024

Conversation

koreanMike513
Copy link
Collaborator

  • import 문 수정 후
  • 조금 더 필요한 필드나 메서드에 한해서 entity class에 추가 했습니다.

- added more fields and methods to domain classes
- fixed import statements (from * to individual import)
@koreanMike513 koreanMike513 added the enhancement New feature or request label Dec 23, 2024
@koreanMike513 koreanMike513 self-assigned this Dec 23, 2024
return food;
}

public BigDecimal calculateCost(int quantity) {
return BigDecimal.valueOf((long) price.intValue() * quantity);

Choose a reason for hiding this comment

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

price.intValue()가 의도하신게 맞는지 확인 부탁드립니다.

Copy link
Collaborator Author

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
@koreanMike513 koreanMike513 added the partially_resolved (requires a another review) resolved the addressed issues requires a review label Dec 24, 2024
@Enumerated(EnumType.STRING)
private OrderStatus status;

@OneToOne(fetch = LAZY)
@JoinColumn(name = "payment_id")
private Payment payment;

public void updateTotalCost(BigDecimal totalCost) {

Choose a reason for hiding this comment

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

totalCost, updateTotalCost, calculateTotalCost 중 필요한 것만 노출 고려

@koreanMike513 koreanMike513 merged commit bf5ab8e into fix/fix-base-time-entity Dec 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request partially_resolved (requires a another review) resolved the addressed issues requires a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants