<?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('payment_contributions', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('employee_id',150)->index();
            $table->string('company_id',150)->index();
            $table->string('dealer_id',150)->index();
            $table->string('contribution_id',150)->index();
            $table->string('amount',150);
            $table->string('frequency',5);
            $table->string('credit',255)->nullable();
            $table->date('effectivity_date');
            $table->longText('remarks')->nullable();
            $table->boolean('paused')->default(false);
            $table->boolean('enabled')->default(true);
            $table->date('resume_date')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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