feat(core): UserStatus + ExceptionLedgerStatus Enum 추가 (리뷰 3a)

2단계에서 매직 스트링 일부가 1단계 Enum 도메인 밖이라 미교체로 남은
두 도메인의 Enum을 추가.

- vo/user/UserStatus.java {ACTIVE, LOCKED, RETIRED}
  근거: V7 DDL users.status 주석 명시
- vo/ledger/ExceptionLedgerStatus.java {NEW, APPLIED, CANCELLED}
  근거: V5 DDL exception_ledger.status DEFAULT 'NEW'.
  현재 코드에서는 NEW만 사용. APPLIED/CANCELLED는 향후 전이 상태 추론.

approve_status(ApproveStatus)는 별개 컬럼이므로 혼동 주의.

3b 단계(api-developer)가 AuthService/UserService/LedgerService의
잔여 매직 스트링을 이 Enum으로 교체 예정.
This commit is contained in:
GA Pro
2026-05-12 23:17:24 +09:00
parent a8f0b6edf9
commit 693275e9e0
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.ga.core.vo.ledger;
/**
* 예외원장 처리 상태 코드 (exception_ledger.status 컬럼 — approve_status와 별개)
* V5 DDL 기본값 NEW. 코드베이스 전체에서 확인된 값: NEW
* approve_status(PENDING/APPROVED/REJECTED)는 ApproveStatus Enum 사용.
*/
public enum ExceptionLedgerStatus {
NEW, // 신규 등록 (초기값)
APPLIED, // 정산에 반영됨
CANCELLED; // 취소
public String code() {
return this.name();
}
}
@@ -0,0 +1,15 @@
package com.ga.core.vo.user;
/**
* 사용자 계정 상태 코드 (V7 DDL users.status 주석 기준)
* DB users.status: ACTIVE / LOCKED / RETIRED
*/
public enum UserStatus {
ACTIVE, // 정상
LOCKED, // 잠금 (로그인 실패 초과)
RETIRED; // 비활성(퇴직 등)
public String code() {
return this.name();
}
}