Skip to content

Conversation

@hodoon
Copy link
Collaborator

@hodoon hodoon commented Jan 19, 2026

🔗 Related Issue

📝 Summary

소비 습관 분석을 위한 트로피 시스템의 도메인 설계 및 기본 API를 구현
현재 가계부(Ledger) 및 회원(Member) 도메인이 완성되지 않아, 집계 로직은 Mock 데이터로 대체되었으며 추후 연동 예정

🔄 Changes

  • API 변경 (추가/수정)
  • GET /api/trophies: 전체 트로피 메타 정보 조회
  • GET /api/members/me/trophies: 내 트로피 달성 현황(스냅샷) 조회
  • 데이터 및 도메인 변경 (DB, 비즈니스 로직)
  • Entity: Trophy(메타), MemberTrophy(누적), MemberTrophySnapshot(기간별 이력) 설계 및 DDL 적용
  • Enum: TrophyType에 트로피별 달성 조건(Predicate) 정의
  • Repository: QueryDSL 설정 추가 및 집계용 Repository(TrophyAnalysisRepository) 생성
  • 설정 또는 인프라 관련 변경
  • SecurityConfig: 트로피 API에 ROLE_USER 권한 설정
  • QueryDSL: 빌드 설정 및 Config 추가

💬 Questions & Review Points

  • Mock 데이터 사용: TrophyAnalysisRepository의 calculateStatsMock 메서드에서 임의의 소비 통계 데이터를 반환하도록 해둠. 가계부 도메인 완성 시 실제 QueryDSL 로직으로 교체해야 함.
  • 스냅샷 구조: MemberTrophySnapshot 테이블에 period_key(예: '2023-10')와 period_type(MONTHLY 등)을 복합 유니크 키로 잡아둠

📸 API Test Results (Swagger)

image image

✅ Checklist

  • API 테스트 완료
  • 테스트 결과 사진 첨부
  • 빌드 성공 확인 (./gradlew build)

@hodoon hodoon self-assigned this Jan 19, 2026
@hodoon hodoon added ✨ feat 기능 구현 도훈 도훈 labels Jan 19, 2026
Copy link
Collaborator

@JeongGyul JeongGyul left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!
코멘트 한번 봐주세요~

"/auth/signup",
"/auth/email/**",
"/auth/status",
"/api/**"
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기도 테스트 끝나고 맨 마지막에는 지우면 좋을거 같습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

사용자 기능 추가되는 대로 삭제하면 될것 같습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 기능 구현 도훈 도훈

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants