[BE/FEAT] 식사 등록 단위에 따른 식사 등록 및 분석 로직 개선 #640
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌관련 이슈
closes #639
🔑 주요 변경사항
MEAL_FOOD_TB에 MEAL_FOOD_UNIT_TYPE 칼럼을 추가해 단위별 측정 단위를 명확하게 구분하도록 수정 (기존에는 각 단위가 null임을 사용하여 판별)
기존에는 MealStrategy 인터페이스를 사용해 측정 전략을 관리했으나 측정 방식이 늘어남에 따라 구현체들이 많아져 관리가 힘들어짐. 따라서, UnitType Enum을 사용하여 단위별 측정 전략을 직접 관리하도록 수정
변경 전)
변경 후)