<?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('prl_monthly_attens', function (Blueprint $table) {
            $table->id();
            $table->integer('ma_id')->default(0);
            $table->string('emp_id',50)->nullable();
            $table->date('a_date')->nullable();
            $table->double('full_day',10,2)->default(0);
            $table->double('half_day',10,2)->default(0);
            $table->double('ot_days',10,2)->default(0);
            $table->double('total',10,2)->default(0);
            $table->double('t_wrking_dys',10,2)->default(0);
            $table->double('absent',10,2)->default(0);
            $table->double('CL',10,2)->default(0);
            $table->double('PL',10,2)->default(0);
            $table->integer('branch_id')->default(0);
            $table->integer('company_id')->default(0);
            $table->integer('added_by')->default(0);
            $table->integer('added_on')->default(0);
            $table->integer('status')->default(0);


            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prl_monthly_attens');
    }
};
