loan paid off ltter

This commit is contained in:
2025-11-02 23:16:32 +05:00
parent 8c1b128df2
commit 44f00a8f5d
7 changed files with 233 additions and 2 deletions

View File

@@ -0,0 +1,53 @@
<?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('loan_paid_off_letters', function (Blueprint $table) {
$table->id();
$table->string('unique_id')->nullable()->unique();
$table->string('region', 2)->index();
$table->foreignId('branch_id')->constrained('branches')->restrictOnDelete();
$table->string('customer_name')->index();
$table->string('customer_surname')->index();
$table->string('customer_patronic_name')->nullable();
$table->date('born_at')->nullable();
$table->string('phone')->nullable()->index();
$table->string('passport_serie')->index();
$table->string('passport_id')->index();
$table->string('status')->nullable()->index();
$table->text('notes')->nullable();
$table->foreignId('user_id')->constrained('users')->restrictOnDelete();
$table->string('loan_contract_number')->nullable();
$table->string('loan_contract_date')->nullable();
$table->string('loan_amount')->nullable();
$table->string('loan_reason')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};