feat: I-3 법인카드 사용내역 API 구현

- CardTransactionController: 카드 거래내역 조회 API
- CardTransactionService: 카드 거래 조회 로직
- Withdrawal 모델 카드 필드 확장
- Swagger 문서화
- withdrawals 테이블 카드 필드 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-26 15:46:48 +09:00
parent dced7b7fd3
commit e7862ed6e6
5 changed files with 624 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('withdrawals', function (Blueprint $table) {
// 카드 관련 필드 추가
$table->unsignedBigInteger('card_id')->nullable()->after('bank_account_id')->comment('카드 ID');
$table->string('merchant_name', 100)->nullable()->after('client_name')->comment('가맹점명 (카드 결제시)');
$table->timestamp('used_at')->nullable()->after('withdrawal_date')->comment('사용일시 (카드 결제시)');
// 인덱스
$table->index('card_id', 'idx_card');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('withdrawals', function (Blueprint $table) {
$table->dropIndex('idx_card');
$table->dropColumn(['card_id', 'merchant_name', 'used_at']);
});
}
};