금융 거래 기록 흐름 공통화
This commit is contained in:
@@ -32,6 +32,7 @@ Financial은 개인 금융 데이터를 서버 렌더링 PHP 화면에서 관리
|
||||
- `app/lib/auth.php`: 인증, remember token, CSRF, no-store header
|
||||
- `app/lib/db.php`: PDO 연결
|
||||
- `app/lib/account_service.php`: 계좌 서비스
|
||||
- `app/lib/transaction_record_service.php`: 거래 fingerprint, 입력 검증, 공통 거래 row 기록
|
||||
- `app/lib/transaction_service.php`: 거래 저장과 조회
|
||||
- `app/lib/installment_service.php`: 할부 청구와 선납 처리
|
||||
- `app/lib/loan_service.php`: 대출과 상환 처리
|
||||
@@ -58,9 +59,12 @@ Financial은 개인 금융 데이터를 서버 렌더링 PHP 화면에서 관리
|
||||
4. 저장 후 redirect와 flash 메시지로 응답합니다.
|
||||
5. 카테고리 추천 API는 merchant rule 우선순위와 confidence를 반환합니다.
|
||||
|
||||
거래 테이블에 실제 row를 추가하는 공통 경로는 `transaction_record_service.php`입니다. 일반 거래 등록/수정은 같은 입력 검증 함수를 쓰고, 대출 실행/상환/중도상환과 할부 선결제도 공통 기록 함수를 통해 `transactions`에 남깁니다. 카드/계좌/할부/대출 기능을 바꿀 때는 먼저 이 공통 기록 규칙과 잔액 재계산 흐름을 확인해야 합니다.
|
||||
|
||||
## 주요 함수/모듈
|
||||
|
||||
- `auth.php`: 로그인, 세션, CSRF
|
||||
- `transaction_record_service.php`: 거래 공통 검증과 row 기록
|
||||
- `transaction_service.php`: 거래 저장과 조회
|
||||
- `installment_*`: 할부 청구와 선납 처리
|
||||
- `merchant_rules.php`: 가맹점 자동분류 규칙 관리
|
||||
|
||||
Reference in New Issue
Block a user