feat:법인카드 테이블 마이그레이션 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-30 19:12:00 +09:00
parent 1c3cb48c7c
commit 1ae9a29c62

View File

@@ -0,0 +1,45 @@
<?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::create('corporate_cards', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id');
$table->string('card_name', 100)->comment('카드명');
$table->string('card_company', 50)->comment('카드사');
$table->string('card_number', 30)->comment('카드번호');
$table->enum('card_type', ['credit', 'debit'])->default('credit')->comment('카드종류');
$table->tinyInteger('payment_day')->default(15)->comment('결제일');
$table->decimal('credit_limit', 15, 2)->default(0)->comment('한도');
$table->decimal('current_usage', 15, 2)->default(0)->comment('현재 사용액');
$table->string('card_holder_name', 100)->nullable()->comment('이용자명(명의자)');
$table->string('actual_user', 100)->nullable()->comment('실사용자');
$table->string('expiry_date', 10)->nullable()->comment('유효기간 YY/MM');
$table->string('cvc', 10)->nullable()->comment('CVC');
$table->enum('status', ['active', 'inactive'])->default('active')->comment('상태');
$table->text('memo')->nullable()->comment('메모');
$table->timestamps();
$table->softDeletes();
$table->index('tenant_id');
$table->index('status');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('corporate_cards');
}
};