Init: Hoan thanh kien truc V3 va Filament UI
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?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('payments', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('contract_id')->constrained('contracts')->cascadeOnDelete();
|
||||
$table->string('payment_type');
|
||||
$table->integer('installment_no')->default(1);
|
||||
$table->decimal('amount', 15, 2);
|
||||
$table->date('due_date')->nullable();
|
||||
$table->date('paid_date')->nullable();
|
||||
$table->string('status')->default('PENDING'); // PENDING, PAID, OVERDUE, CANCELLED
|
||||
$table->string('receipt_number')->nullable();
|
||||
$table->jsonb('metadata')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
public function down(): void { Schema::dropIfExists('payments'); }
|
||||
};
|
||||
Reference in New Issue
Block a user