feat:환불/해지 관리 테이블 마이그레이션 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-04 22:37:35 +09:00
parent cee37b3e20
commit 0d1b088463

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
{
public function up(): void
{
Schema::create('refunds', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id');
$table->string('type', 20)->default('refund'); // refund, cancel
$table->string('customer_name', 100);
$table->date('request_date');
$table->string('product_name', 100);
$table->bigInteger('original_amount')->default(0);
$table->bigInteger('refund_amount')->default(0);
$table->string('reason', 100)->nullable();
$table->string('status', 20)->default('pending'); // pending, approved, completed, rejected
$table->date('process_date')->nullable();
$table->text('note')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['tenant_id', 'status']);
$table->index(['tenant_id', 'type']);
});
}
public function down(): void
{
Schema::dropIfExists('refunds');
}
};