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

예산 설정 도우미 #5

Open
6 tasks done
buhee1029 opened this issue Nov 11, 2023 · 1 comment
Open
6 tasks done

예산 설정 도우미 #5

buhee1029 opened this issue Nov 11, 2023 · 1 comment

Comments

@buhee1029
Copy link
Owner

buhee1029 commented Nov 11, 2023

  • 카테고리 별 예산 설정에 어려움이 있는 사용자를 위해 예산 비율 추천 기능
  • 총액을 입력하면 카테고리 별 예산 자동 생성
  • 자동 생성된 예산은 기존 이용 중인 사용자들이 설정한 평균값
통계된 사용자들의 예산이 평균적으로 식비가 40%, 교통비 20% 이라면 이에 맞게 추천
(10%이하 카테고리는 모두 묶어 기타로 제공), 총액 100만원 입력 → 식비 40만원, 교통비 20만원, 기타 15% 으로

  • 카테고리별 평균 예산 비율 구하는 네이티브 쿼리 작성
  • 카테고리별 예산 비율 추천 기능
    • 카테고리별 평균 예상 비율 조회
    • 입력받은 총액(total_amount)을 각 카테고리별 비율에 맞게 업데이트 후 반환
    • 비율이 10% 이하는 기타로 묶어서 반환
  • 예산 추천 카테고리가 고정적이지 않고 변할 수 있기때문에 Map<Category, Integer> 로 반환

♻️ 사용할 수 없는 카테고리에 대한 예외 처리

@buhee1029
Copy link
Owner Author

buhee1029 commented Nov 13, 2023

기존에는 프론트엔드와 특정 코드에 맞는 카테고리를 미리 설정했다는 가정 하에 Enum Category 에서 C001 와 같은 코드로 관리했는데 그러지 않고 value 값으로 관리하도록 변경하였다. 카테고리를 어떻게 관리해야할지 더 고민을 해봐야겠다.

@buhee1029 buhee1029 reopened this Nov 27, 2023
@buhee1029 buhee1029 changed the title 예산 설계(추천) 예산 설정 도우미 Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant