working on loan orders
This commit is contained in:
@@ -15,6 +15,7 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('region', 2)->index();
|
||||
$table->jsonb('name');
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,10 +18,11 @@ return new class extends Migration
|
||||
$table->string('unique_code')->index()->nullable();
|
||||
|
||||
$table->string('region', 2)->index();
|
||||
$table->foreignId('province_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('province_id')->nullable()->constrained()->restrictOnDelete();
|
||||
|
||||
$table->string('billing_username')->nullable();
|
||||
$table->string('billing_password')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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_types', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->string('tax')->nullable();
|
||||
$table->string('maturity')->nullable();
|
||||
$table->string('notes')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('loan_orders');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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_orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('unique_id')->unique();
|
||||
|
||||
$table->foreignId('loan_type')->constrained()->restrictOnDelete();
|
||||
|
||||
$table->string('region', 2)->index();
|
||||
$table->foreignId('branch_id')->constrained()->restrictOnDelete();
|
||||
|
||||
$table->string('customer_name')->index();
|
||||
$table->string('customer_surname')->index();
|
||||
$table->string('customer_patronic_name')->nullable();
|
||||
|
||||
$table->string('passport_address');
|
||||
$table->string('real_address');
|
||||
|
||||
$table->string('passport_serie')->index();
|
||||
$table->integer('passport_id')->index();
|
||||
$table->date('passport_given_at');
|
||||
$table->string('passport_given_by');
|
||||
|
||||
$table->string('born_place');
|
||||
$table->date('born_at');
|
||||
|
||||
$table->string('email')->nullable()->index();
|
||||
$table->string('phone')->index();
|
||||
$table->string('phone_additional')->nullable();
|
||||
$table->string('phone_home')->nullable();
|
||||
|
||||
$table->string('work_region')->nullable()->index();
|
||||
$table->string('work_province')->nullable();
|
||||
$table->string('work_company')->nullable();
|
||||
$table->string('work_company_accountant_number')->nullable();
|
||||
$table->date('work_started_at')->nullable();
|
||||
$table->string('work_salary')->nullable();
|
||||
$table->string('work_position')->nullable();
|
||||
|
||||
$table->string('education');
|
||||
$table->string('marriage_status');
|
||||
|
||||
$table->text('passport_one');
|
||||
$table->text('passport_two');
|
||||
$table->text('passport_three');
|
||||
$table->text('passport_four');
|
||||
|
||||
$table->foreignId('filled_by')->constrained('users')->restrictOnDelete();
|
||||
$table->foreignId('user_id')->constrained('users')->restrictOnDelete();
|
||||
|
||||
$table->string('status')->index();
|
||||
$table->string('status_reason')->nullable();
|
||||
|
||||
$table->string('notes')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('loan_orders');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user