<?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::table('tenants', function (Blueprint $table) {
            $table->boolean('tax_liable')->default(false);
            $table->unsignedTinyInteger('vat_rate')->default(0);
            $table->string('tax_exemption_reason')->nullable();
            $table->text('tax_exemption_note')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('tenants', function (Blueprint $table) {
            $table->dropColumn([
                'tax_liable',
                'vat_rate',
                'tax_exemption_reason',
                'tax_exemption_note',
            ]);
        });
    }
};
