-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: garden 수정 #163
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
refactor: garden 수정 #163
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough애플리케이션에 JPA 감사(auditing)를 활성화하고, Garden 엔티티의 createdAt/updatedAt 필드 제약과 unlock() 동작을 수정했으며, UserService에서 일일 물주기 카운트를 프로필 사용자와 현재 사용자 기준으로 분리 계산하도록 로직을 재구성했습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as CpMainBeApplication
participant JPA as Spring Data JPA
Note over App: 애플리케이션 기동
App->>JPA: EnableJpaAuditing 활성화
JPA-->>App: 생성/수정 시간 자동 감지 준비
sequenceDiagram
autonumber
participant Client as Client
participant UserSvc as UserService
participant Repo as Repositories
Note over Client,UserSvc: 프로필 조회 흐름(물주기 카운트 분리)
Client->>UserSvc: getUserProfile(profileUserId, currentUserId)
UserSvc->>Repo: 프로필 사용자 물주기 횟수 조회
UserSvc->>Repo: 현재 사용자 물주기 횟수/대상 조회
UserSvc->>UserSvc: 잔여 횟수 계산 (프로필 사용자, 현재 사용자 분리)
UserSvc-->>Client: 응답 (isWateringAbleByMe, leftWaterCountForProfileUser 등)
sequenceDiagram
autonumber
participant Domain as Garden
participant JPA as AuditingListener
Note over Domain,JPA: unlock 동작 변경
activate Domain
Domain->>Domain: unlock()
Domain->>Domain: isLocked = false
Domain->>Domain: createdAt = now(), updatedAt = now()
JPA-->>Domain: @LastModifiedDate 처리(저장 시점)
deactivate Domain
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
📝 개요
이번 PR의 핵심 내용을 한 줄로 요약해 주세요.
💻 작업 내용
이번 PR에서 작업한 내용을 상세히 설명해 주세요.
작업 내용 1
작업 내용 2
...
✅ PR 체크리스트
PR을 보내기 전에 아래 체크리스트를 확인해 주세요.
커밋 메시지는 포맷에 맞게 작성했나요?
스스로 코드를 다시 한번 검토했나요?
관련 이슈를 연결했나요?
빌드 및 테스트가 로컬에서 성공했나요?
🔗 관련 이슈
스크린샷 (선택)
UI 변경 사항이 있다면 스크린샷을 첨부해 주세요.
Summary by CodeRabbit
버그 수정
리팩터링
기타 작업