<?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('work_suspensions', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('company_id',20)->nullable()->index();
            $table->string('dealership_id',20)->nullable()->index();
            $table->date('date');
            $table->string('reason');
            $table->boolean('half_day')->default(true);
            $table->boolean('enabled')->default(true);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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