Optimize code

This commit is contained in:
Daeng Deni Mardaeni
2024-08-13 11:54:42 +07:00
parent 5c4285c77e
commit e950b73b44
42 changed files with 1064 additions and 991 deletions

View File

@@ -1,33 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('jenis_fasilitas_kredit', function (Blueprint $table) {
$table->id();
$table->string('code');
$table->string('name');
$table->timestamps();
$table->softDeletes();
$table->uuid('created_by')->nullable();
$table->uuid('updated_by')->nullable();
$table->uuid('deleted_by')->nullable();
});
}
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('jenis_fasilitas_kredit', function (Blueprint $table) {
$table->id();
$table->string('code')->unique()->index();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_fasilitas_kredit');
}
};
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('jenis_fasilitas_kredit');
}
};

View File

@@ -1,33 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('jenis_jaminan', function (Blueprint $table) {
$table->id();
$table->string('code');
$table->string('name');
$table->timestamps();
$table->softDeletes();
$table->uuid('created_by')->nullable();
$table->uuid('updated_by')->nullable();
$table->uuid('deleted_by')->nullable();
});
}
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('jenis_jaminan', function (Blueprint $table) {
$table->id();
$table->string('code')->unique()->index()();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_jaminan');
}
};
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('jenis_jaminan');
}
};

View File

@@ -1,33 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('jenis_legalitas_jaminan', function (Blueprint $table) {
$table->id();
$table->string('code');
$table->string('name');
$table->timestamps();
$table->softDeletes();
$table->uuid('created_by')->nullable();
$table->uuid('updated_by')->nullable();
$table->uuid('deleted_by')->nullable();
});
}
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('jenis_legalitas_jaminan', function (Blueprint $table) {
$table->id();
$table->string('code')->unique()->index();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_legalitas_jaminan');
}
};
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('jenis_legalitas_jaminan');
}
};

View File

@@ -1,33 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('jenis_aset', function (Blueprint $table) {
$table->id();
$table->string('code');
$table->string('name');
$table->timestamps();
$table->softDeletes();
$table->uuid('created_by')->nullable();
$table->uuid('updated_by')->nullable();
$table->uuid('deleted_by')->nullable();
});
}
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('jenis_aset', function (Blueprint $table) {
$table->id();
$table->string('code')->unique()->index();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_aset');
}
};
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('jenis_aset');
}
};

View File

@@ -1,38 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('branches', function (Blueprint $table) {
$table->id();
$table->string('code', 9)->unique();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('branches', function (Blueprint $table) {
$table->id();
$table->string('code', 9)->unique();
$table->string('name');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('branches');
}
};
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('branches');
}
};

View File

@@ -1,39 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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('currencies', function (Blueprint $table) {
$table->id();
$table->string('code',3)->unique();
$table->string('name');
$table->integer('decimal_places')->default(2);
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('currencies', function (Blueprint $table) {
$table->id();
$table->string('code', 3)->unique();
$table->string('name');
$table->integer('decimal_places')->default(2);
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('currencies');
}
};
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('currencies');
}
};