Loan paid off letter order
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use App\Repos\Order\OrderRepo;
|
||||
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_letter_orders', 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()->default(OrderRepo::defaultStatus())->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();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('loan_paid_off_letter_orders');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user