<?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('tax_branches', function (Blueprint $table) {
            $table->id();

            $table->string('legal_name', 200)->nullable();   // Nombre Legal de la Sucursal
            $table->string('email', 200)->nullable();        // Correo Oficial de la Sucursal
            $table->char('zip', 10)->nullable();             // Código Postal Fiscal de la Sucursal
            $table->json('tax_address')->nullable();         // Dirección Fiscal de la Sucursal
            $table->text('sample_address')->nullable();      // Dirección Fiscal de la Sucursal (ensamblada)

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

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