CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAttendanceRulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('attendance_rules', function (Blueprint $table) {
$table->id();
$table->foreignId('attendance_type_id')->constrained('attendance_types')->cascadeOnDelete();
$table->integer('cal_start_date');
$table->integer('cal_end_date');
$table->time('start_time')->nullable();
$table->integer('late_allowed')->nullable();
$table->time('end_time')->nullable();
$table->integer('break_time')->nullable();
$table->integer('working_hr')->nullable();
$table->integer('wfh_month')->nullable();
$table->integer('wfh_days')->nullable();
$table->time('break_time_start')->nullable();
$table->time('break_time_end')->nullable();
$table->integer('no_days_late')->nullable();
$table->integer('deduction_day')->nullable();
$table->decimal('holiday_extra_payment',10,2)->nullable();
$table->integer('how_many_times')->nullable();
$table->string('observation_day_present')->nullable();
$table->date('from_date')->nullable();
$table->integer('interval_period')->nullable();
$table->date('to_date')->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('attendance_rules');
}
}