Add Field Authorization,

This commit is contained in:
Daeng Deni Mardaeni 2023-11-06 10:35:19 +07:00
parent 3ed6b844f5
commit 3d14dc2c2b
6 changed files with 60 additions and 38 deletions

View File

@ -1,11 +1,10 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
return new class extends Migration {
/**
* Run the migrations.
*
@ -15,14 +14,19 @@ return new class extends Migration
{
Schema::create('branches', function (Blueprint $table) {
$table->id();
$table->string('kode',9)->unique();
$table->string('kode', 9)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$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();
});
}
@ -35,4 +39,4 @@ return new class extends Migration
{
Schema::dropIfExists('branches');
}
};
};

View File

@ -17,12 +17,16 @@ return new class extends Migration
$table->id();
$table->string('kode',3)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$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();
});
}

View File

@ -17,13 +17,16 @@ return new class extends Migration
$table->id();
$table->string('kode',3)->unique();
$table->string('name');
$table->string('status', 1)->default('A');
$table->char('status', 1)->default('A');
$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();
});
}

View File

@ -9,7 +9,11 @@
{
protected $fillable = [
'kode',
'name'
'name',
'status',
'authorized_at',
'authorized_status',
'authorized_by',
];
}

View File

@ -9,7 +9,11 @@
{
protected $fillable = [
'kode',
'name'
'name',
'status',
'authorized_at',
'authorized_status',
'authorized_by',
];
}

View File

@ -7,10 +7,13 @@
class GuaranteeType extends BaseModel
{
protected $table = 'guarantee_types';
protected $fillable = [
'kode',
'name'
'name',
'status',
'authorized_at',
'authorized_status',
'authorized_by',
];
}