<?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::table('users', function (Blueprint $table) {
            $table->enum('user_type', ['Cliente', 'Administrador', 'Super_Administrador','Gestor_Obra','Tecnicos','inspetor'])
                ->default('Cliente')
                ->after('password');

            $table->integer('user_phone')
            ->after('user_type')
            ->nullable();

            $table->string('user_nif', 15)->after('user_phone');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('user_type');
            $table->dropColumn('user_phone');
            $table->dropColumn('user_nif');
        });
    }
};
