Repository navigation
feat: 플랜 구분 제거 · 사용 한도 UsageLimits로 통합 (#60) - #61
Merged
Merged
Conversation
oTAETAEo
approved these changes
Nov 2, 2026
oTAETAEo
left a comment
Contributor
There was a problem hiding this comment.
고생하셨습니다 먼저 머지 해 주시면 언급 해 주신 PR 맞춰서 수정 하겠습니다 👍
Contributor
There was a problem hiding this comment.
보유 템플릿 한도, AI 톤 교정 같은 경우는 각각 템플릿, ai 패키지로 이동해도 좋을 것 같기도 하구
둘이 분리되어있으면 너무 분리되어 있는 것 아닌가 싶기도 하네요 ㅎㅎ
한도라는 관점에서 전체적으로 사용될 여지가 있다는 생각이 들기도 하고, 한도라는 책임으로 묶는 게 나은 것 같아서
위치 좋은 것 같은 생각입니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
관련 이슈
작업 내용
명세·ERD v0.8(#58)에 맞춰 플랜 구분을 코드에서 없앴습니다. 템플릿 한도는 모든 사용자 50개(휴지통 제외), AI 톤 교정은 모든 사용자 하루 5회(KST)입니다.
global/policy/UsageLimits상수(TEMPLATE_LIMIT = 50,AI_TONE_DAILY_LIMIT = 5) 한 곳으로 모음PlanQueryService,PlanResult)과 테스트 삭제TemplateCommandService: 생성·갤러리 저장의 한도 검사를 상수로 바꿈.lockUser→ 개수 검사 순서는 그대로AiToneUsageQueryService: 상수 한도 사용.AiToneUsageResult.available삭제 (명세 6번에서aiTone.available삭제)AiToneUsageCommandService.reserve(userId, limit)→reserve(userId): 한도를 안에서 상수로 씀Plan·TemplateSort열거형,User.planOverride·templateSort,UserQueryService.findPlanOverride삭제V202611021541__drop_users_plan_override_and_template_sort.sql추가 (기존 init 파일은 고치지 않음)plan_override제거, 1·2번 모두 일반 회원(user1@·user2@sniptext.local)명세와 달라진 점
없음
테스트
PlanQueryServiceTest,UserQueryServiceTest(테스트가 모두findPlanOverride용이라 파일째), PRO 한도·플랜 변경 테스트./gradlew build통과확인 체크리스트
./gradlew build통과global공통 코드를 바꿨다면 디스코드에 공유함 (global/policy패키지 새로 추가)리뷰어에게
global/policy/UsageLimits상수로 둔 위치가 괜찮은지 봐 주세요. domain → global은 ArchUnit에서 허용됩니다.getTodayUsage는 이제 회원이 있는지 확인하지 않습니다. 예전에는 플랜 조회에서 USER404_1을 냈지만, 명세 6번은 전용 에러가 없습니다. 회원 확인은 사용량 API를 만들 때 조합 서비스에서 합니다.INSERT IGNORE라서 이미 만든 로컬·개발 DB의 1·2번 행은 바뀌지 않습니다. 이메일·닉네임 변경은 새 DB에서만 보입니다. 컬럼 삭제는 마이그레이션으로 반영됩니다.TemplateCommandService의planQueryService필드 부분이 겹칩니다. 먼저 병합되는 쪽 기준으로 나중 쪽이 develop을 합치면서 충돌을 풀면 됩니다 (PlanQueryService필드를 지우고 한도 검사를UsageLimits.TEMPLATE_LIMIT으로).