fix: [bank-account] 계좌 관리 API 누락 필드 8개 보강
- account_type, balance, currency, opened_at, branch_name, memo, sort_order, last_transaction_at 추가 - Model: fillable, casts, hidden, scopes, accessors를 MNG 모델 기준으로 통일 - Service: store/update에 누락 필드 반영 - FormRequest: Store/Update에 검증 규칙 추가
This commit is contained in:
@@ -94,9 +94,16 @@ public function store(array $data): BankAccount
|
||||
'account_number' => $data['account_number'],
|
||||
'account_holder' => $data['account_holder'],
|
||||
'account_name' => $data['account_name'],
|
||||
'account_type' => $data['account_type'] ?? null,
|
||||
'balance' => $data['balance'] ?? 0,
|
||||
'currency' => $data['currency'] ?? 'KRW',
|
||||
'opened_at' => $data['opened_at'] ?? null,
|
||||
'branch_name' => $data['branch_name'] ?? null,
|
||||
'memo' => $data['memo'] ?? null,
|
||||
'status' => $data['status'] ?? 'active',
|
||||
'assigned_user_id' => $data['assigned_user_id'] ?? null,
|
||||
'is_primary' => $isPrimary,
|
||||
'sort_order' => $data['sort_order'] ?? 0,
|
||||
'created_by' => $userId,
|
||||
'updated_by' => $userId,
|
||||
]);
|
||||
@@ -124,8 +131,15 @@ public function update(int $id, array $data): BankAccount
|
||||
'account_number' => $data['account_number'] ?? $account->account_number,
|
||||
'account_holder' => $data['account_holder'] ?? $account->account_holder,
|
||||
'account_name' => $data['account_name'] ?? $account->account_name,
|
||||
'account_type' => $data['account_type'] ?? $account->account_type,
|
||||
'balance' => $data['balance'] ?? $account->balance,
|
||||
'currency' => $data['currency'] ?? $account->currency,
|
||||
'opened_at' => $data['opened_at'] ?? $account->opened_at,
|
||||
'branch_name' => $data['branch_name'] ?? $account->branch_name,
|
||||
'memo' => $data['memo'] ?? $account->memo,
|
||||
'status' => $data['status'] ?? $account->status,
|
||||
'assigned_user_id' => $data['assigned_user_id'] ?? $account->assigned_user_id,
|
||||
'sort_order' => $data['sort_order'] ?? $account->sort_order,
|
||||
'updated_by' => $userId,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user