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 core entities #98

Merged
merged 8 commits into from
Feb 9, 2025
Merged

Conversation

koreanMike513
Copy link
Collaborator

  • core 엔티티들의 필드들을 필요에 업데이트 하였습니다.
  • food 엔티티의 경우에는 Unit test를 추가로 작성했습니다.

@koreanMike513 koreanMike513 self-assigned this Feb 4, 2025
private RoundingMode roundingMode;

@PrePersist

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;

Choose a reason for hiding this comment

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

BigDecimal이 아닌 이유가 있을까요?

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을 사용할 정도로 정확하지는 않아도 된다고 생각하여 이렇게 적었습니다. 수정하겠습니다.

this.collectionEndTime = collectionEndTime;
}

public List<String> getTags() {

Choose a reason for hiding this comment

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

처음부터 리스트가 아닌 String으로 저장하는 이유가 궁금합니다.

Copy link
Collaborator Author

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 비교를 통해서 추후에 다시 생각해보도록 하겠습니다.

@koreanMike513 koreanMike513 merged commit b36ab9d into main Feb 9, 2025
2 checks passed
Copy link

github-actions bot commented Feb 9, 2025

HCP Terraform Plan Output

```
Plan: 1 to add, 0 to change, 0 to destroy.
```
[HCP Terraform Plan](https://app.terraform.io/app/Joyeuse_Planete/workspaces/Joyeuse_Planete/runs/run-GYXN3LDLSbjnKrCR)

@koreanMike513 koreanMike513 deleted the update/update-core-entities branch February 9, 2025 18:44
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