CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ot_requests', function (Blueprint $table) {
$table->id();
$table->string('employee_id');
$table->string('req_id');
$table->foreignId('ot_type_id')->constrained('otrules')->cascadeOnDelete();
$table->date('ot_date');
$table->time('ot_hour');
$table->string('ot_reason');
$table->string('manager_id')->nullable();
$table->tinyInteger('manager_approval_status')->default('1');
$table->string('hr_id')->nullable();
$table->tinyInteger('hr_approval_status')->default('1'); //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('ot_requests');
}
};