<?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('worker_experiences', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('worker_id')->index();
            $table->bigInteger('burden_rate_id')->index()->nullable();
            $table->bigInteger('experience_id')->index();
            $table->bigInteger('expertise_id')->index();
            $table->string('experience', 100)->nullable();
            $table->string('expertise', 100)->nullable();
            $table->enum('is_worker', ['true', 'false']);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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