<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('acceptaties', function (Blueprint $table) {
            $table->id();
            $table->foreignId('overdrachtsplan_id')->constrained('overdrachtsplannen')->cascadeOnDelete();
            $table->date('datum');
            $table->foreignId('door_id')->constrained('users')->restrictOnDelete();
            $table->text('opmerkingen')->nullable();
            $table->enum('status', ['geaccepteerd', 'afgewezen', 'voorwaardelijk']);
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('acceptaties');
    }
};
