<?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('manifestation_interets', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('infra_id')->unsigned()->nullable();
            $table->foreign('infra_id')->references('id')->on('infrastructures')->nullable();

            $table->bigInteger('client_id')->unsigned()->nullable();
            $table->foreign('client_id')->references('id')->on('clients')->nullable();

            $table->bigInteger('typeUnite_id')->unsigned()->nullable();
            $table->foreign('typeUnite_id')->references('id')->on('type_unites')->nullable();
            $table->string('nbChambre')->nullable();
            $table->string('nbDouche')->nullable();
            $table->string('numDossier')->nullable();
            $table->timestamps();
        });
    }

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