diff --git a/plans/erp-api-development-plan.md b/plans/erp-api-development-plan.md index b6553f5..e00430c 100644 --- a/plans/erp-api-development-plan.md +++ b/plans/erp-api-development-plan.md @@ -2,7 +2,7 @@ > **작성일**: 2025-12-17 > **기준 문서**: SAM_ERP_Storyboard_D0.8_251216 -> **상태**: 🟢 Phase 1 진행 중 (2/6 완료: 휴가 관리, 근무/출퇴근 설정) +> **상태**: 🟢 Phase 1 진행 중 (3/6 완료: 휴가 관리, 근무/출퇴근 설정, 카드/계좌 관리) --- @@ -67,7 +67,7 @@ - [x] **테이블 생성** - [x] `leaves` 마이그레이션 생성 - [x] `leave_balances` 마이그레이션 생성 - - [ ] 마이그레이션 실행 및 검증 + - [x] 마이그레이션 실행 및 검증 - [x] **모델 생성** - [x] `Leave` 모델 (BelongsToTenant, SoftDeletes) @@ -109,7 +109,7 @@ - [x] `work_settings` 마이그레이션 - [x] `attendance_settings` 마이그레이션 - [x] `sites` (현장) 마이그레이션 - - [ ] 마이그레이션 실행 및 검증 + - [x] 마이그레이션 실행 및 검증 - [x] **모델 생성** - [x] `WorkSetting` 모델 (BelongsToTenant) @@ -142,32 +142,47 @@ --- -### 2.3 카드/계좌 관리 +### 2.3 카드/계좌 관리 ✅ > 참조: [99-gap-analysis.md#23-카드계좌-관리](../specs/erp-analysis/99-gap-analysis.md) +> **완료일**: 2025-12-17 | **커밋**: `e1b0c99` -- [ ] **테이블 생성** - - [ ] `cards` 마이그레이션 (카드번호 암호화) - - [ ] `bank_accounts` 마이그레이션 +- [x] **테이블 생성** + - [x] `cards` 마이그레이션 (카드번호 암호화) + - [x] `bank_accounts` 마이그레이션 -- [ ] **모델 생성** - - [ ] `Card` 모델 (암호화 처리) - - [ ] `BankAccount` 모델 +- [x] **모델 생성** + - [x] `Card` 모델 (암호화 처리, Laravel Crypt) + - [x] `BankAccount` 모델 (대표계좌 자동 설정) -- [ ] **서비스 구현** - - [ ] `CardService` 생성 - - [ ] `BankAccountService` 생성 - - [ ] 암호화/복호화 유틸리티 +- [x] **서비스 구현** + - [x] `CardService` 생성 + - [x] `BankAccountService` 생성 + - [x] 암호화/복호화 (Crypt::encryptString/decryptString) -- [ ] **API 엔드포인트** - - [ ] `GET/POST/PUT/DELETE /v1/cards` - 카드 CRUD - - [ ] `PATCH /v1/cards/{id}/toggle` - 사용/정지 - - [ ] `GET/POST/PUT/DELETE /v1/bank-accounts` - 계좌 CRUD - - [ ] `PATCH /v1/bank-accounts/{id}/toggle` - 사용/정지 - - [ ] `PATCH /v1/bank-accounts/{id}/set-primary` - 대표계좌 +- [x] **API 엔드포인트** (15개) + - [x] `GET /v1/cards` - 카드 목록 + - [x] `POST /v1/cards` - 카드 등록 + - [x] `GET /v1/cards/active` - 활성 카드 목록 (셀렉트박스용) + - [x] `GET /v1/cards/{id}` - 카드 상세 + - [x] `PUT /v1/cards/{id}` - 카드 수정 + - [x] `DELETE /v1/cards/{id}` - 카드 삭제 + - [x] `PATCH /v1/cards/{id}/toggle` - 사용/정지 + - [x] `GET /v1/bank-accounts` - 계좌 목록 + - [x] `POST /v1/bank-accounts` - 계좌 등록 + - [x] `GET /v1/bank-accounts/active` - 활성 계좌 목록 (셀렉트박스용) + - [x] `GET /v1/bank-accounts/{id}` - 계좌 상세 + - [x] `PUT /v1/bank-accounts/{id}` - 계좌 수정 + - [x] `DELETE /v1/bank-accounts/{id}` - 계좌 삭제 + - [x] `PATCH /v1/bank-accounts/{id}/toggle` - 사용/정지 + - [x] `PATCH /v1/bank-accounts/{id}/set-primary` - 대표계좌 -- [ ] **Swagger 문서** - - [ ] `CardApi.php` 작성 - - [ ] `BankAccountApi.php` 작성 +- [x] **Swagger 문서** + - [x] `CardApi.php` 작성 + - [x] `BankAccountApi.php` 작성 + +- [ ] **테스트** + - [ ] Feature 테스트 작성 + - [ ] 수동 API 테스트 --- @@ -402,6 +417,16 @@ - Swagger 문서 (`LeaveApi.php`) - i18n 메시지 키 추가 +- [x] **카드/계좌 관리 API 구현 완료** (커밋: `e1b0c99`) + - 마이그레이션 2개 (`cards`, `bank_accounts`) + - 모델 2개 (`Card`, `BankAccount`) + - 서비스 2개 (`CardService`, `BankAccountService`) + - 컨트롤러 2개, FormRequest 4개 + - API 엔드포인트 15개 (카드 7개, 계좌 8개) + - Swagger 문서 (`CardApi.php`, `BankAccountApi.php`) + - 카드번호 암호화 (Laravel Crypt 사용) + - 대표계좌 자동 설정 로직 + ### YYYY-MM-DD - [ ] (작업 내용 기록)