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('leave_rules', function (Blueprint $table) {
$table->id();
$table->foreignId('leave_type_id');
$table->integer('leave_max_days_apply')->nullable();
$table->boolean('attendance_dependent')->nullable();
$table->integer('attendance_days')->nullable();
$table->string('credit_period')->nullable();
$table->integer('credit_no_days')->nullable();
$table->decimal('credit_no_hours',10,2)->nullable();
$table->integer('completion_month')->nullable();
$table->boolean('carry_forwarded')->nullable();
$table->integer('max_days')->nullable();
$table->date('carry_forward_date')->nullable();
$table->boolean('after_carry_forward_lapsed')->nullable();
$table->boolean('after_carry_forward_encash')->nullable();
$table->boolean('certificate_required')->nullable();
$table->integer('certificate_required_days')->nullable();
$table->bigInteger('leave_employee_type_id')->nullable();
$table->string('leave_employee_gender')->nullable();
$table->integer('encashment_amt')->nullable();
$table->boolean('encashment_resign')->nullable();
$table->boolean('advance_leave')->nullable();
$table->boolean('half_day')->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('leave_rules');
}
};