feat:미지급금(payables) 테이블 마이그레이션 추가

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

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('payables', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id');
$table->string('vendor_name', 100);
$table->string('invoice_no', 50);
$table->date('issue_date');
$table->date('due_date')->nullable();
$table->string('category', 50)->default('사무용품');
$table->bigInteger('amount')->default(0);
$table->bigInteger('paid_amount')->default(0);
$table->string('status', 20)->default('unpaid'); // unpaid, partial, paid, overdue
$table->string('description', 255)->nullable();
$table->text('memo')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['tenant_id', 'status']);
$table->index(['tenant_id', 'due_date']);
});
}
public function down(): void
{
Schema::dropIfExists('payables');
}
};