<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('salary_and_wages', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('employee_id')->index();
            $table->date('position_exclusive_date')->nullable();
            $table->date('salary_effectivity_date')->nullable();
            $table->string('payroll_rate', 25)->nullable();
            $table->string('salary_rate', 150);
            $table->string('payment_type', 50)->nullable();
            $table->string('payroll_mode', 50)->nullable();
            $table->string('bank_account', 50)->nullable();
            $table->string('tax_exemption', 50)->nullable();
            $table->string('tax_appplication', 50)->nullable();
            $table->boolean('fixed_pagibig_contribution')->nullable();
            $table->string('pagibig_ee', 25)->nullable();
            $table->string('pagibig_er', 25)->nullable();
            $table->string('charge_salary', 25)->nullable();
            $table->string('cola', 25)->nullable();
            $table->string('shields', 250)->nullable();
            $table->boolean('enabled')->default(true)->index();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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