update module senior officer

This commit is contained in:
majid
2024-09-11 08:31:47 +07:00
parent a51d5fbeff
commit f9fea10607
26 changed files with 1881 additions and 227 deletions

View File

@@ -0,0 +1,54 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Modules\Lpj\Models\Branch;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
: void
{
Schema::create('debitures', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Branch::class)->constrained()->onDelete('cascade');
$table->string('cif', 10)->unique();
$table->string('name');
$table->date('registered_at')->nullable();
$table->string('npwp', 16)->nullable();
$table->string('nomor_id', 16)->nullable();
$table->string('email', 100)->nullable();
$table->string('phone', 15)->nullable();
$table->string('nomor_rekening', 50)->nullable();
$table->string('province_code')->nullable()->index();
$table->string('city_code')->nullable()->index();
$table->string('district_code')->nullable()->index();
$table->string('village_code')->nullable()->index();
$table->string('postal_code', 5)->nullable();
$table->text('address')->nullable();
$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();
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('debitures');
}
};

View File

@@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Mudels\Lpj\Models\Regions;
use Modules\Lpj\Models\Regions;
return new class extends Migration
@@ -15,7 +15,7 @@ return new class extends Migration
{
Schema::create('teams', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Regions::class, 'region_id');
$table->foreignIdFor(Regions::class)->constrained()->onDelete('cascade');
$table->string('code')->unique()->index();
$table->string('name');
$table->char('status')->nullable();

View File

@@ -15,11 +15,9 @@ return new class extends Migration
{
Schema::create('teams_users', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Teams::class);
$table->foreignIdFor(Users::class);
$table->char('status')->nullable();
$table->foreignIdFor(Teams::class)->constrained()->onDelete('cascade');
$table->unsignedBigInteger('user_id');
$table->boolean('status')->default(true)->nullable();
$table->char('authorized_status', 1)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();

View File

@@ -3,7 +3,8 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Modules\Lpj\Models\Penilaian;
use Modules\Lpj\Models\JenisPenilaian;
use Modules\Lpj\Models\Teams;
return new class extends Migration
{
@@ -14,9 +15,9 @@ return new class extends Migration
{
Schema::create('penilaian', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Penilaian::class);
$table->foreignIdFor(JenisPenilaian::class);
$table->foreignIdFor(Teams::class);
$table->foreignIdFor(Users::class);
$table->unsignedBigInteger('user_id');
$table->datetime('tanggal_kunjungan');
$table->text('keterangan');
$table->char('status');
@@ -28,7 +29,7 @@ return new class extends Migration
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}