<?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('empleados', function (Blueprint $table) {
            $table->engine = "InnoDB";
            $table->bigIncrements('id');
            $table->string('clave')->unique();
            $table->string('apellidoPaterno');
            $table->string('apellidoMaterno');
            $table->string('nombre');
            $table->string('puesto');
            $table->string('rfc')->unique();
            $table->BigInteger('centro_trabajo_id')->unsigned();
            $table->foreign('centro_trabajo_id')->references('id')->on('centro_trabajos')->onDelete("cascade");
            $table->BigInteger('estatus_id')->unsigned();
            $table->foreign('estatus_id')->references('id')->on('estatuses')->onDelete("cascade");

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Schema::table('bienes', function (Blueprint $table) {
        //     $table->foreign('categoria_id')->references('id')->on('categorias')->onDelete('cascade');
        // });
    }
};
