CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLoanRequestsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('loan_requests', function (Blueprint $table) {
$table->id();
$table->string('employee_id');
$table->string('req_id');
$table->string('designation')->nullable();
$table->string('department')->nullable();
$table->date('loan_dt')->nullable();
$table->string('loan_type');
$table->decimal('loan_amt',10,2);
$table->integer('no_of_installment');
$table->integer('interest_per');
$table->string('loan_purpose');
// $table->string('manager_id')->nullable();
// $table->tinyInteger('manager_approval_status')->nullable();
$table->string('hr_id')->nullable();
$table->tinyInteger('hr_approval_status')->nullable(); //1-Approved | 0-Reject
$table->string('remarks')->nullable();
$table->tinyInteger('status')->default('1');
$table->string('created_by')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('loan_requests');
}
}