<?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('payment_pix_settings', function (Blueprint $table) {
            $table->id();
            $table->boolean('pix_enabled')->default(false);
            $table->boolean('sandbox_enabled')->default(true);
            $table->string('mercado_pago_public_key', 255)->nullable();
            $table->text('mercado_pago_access_token')->nullable();
            $table->string('pix_key', 255)->nullable();
            $table->string('pix_key_holder', 120)->nullable();
            $table->string('notification_email', 190)->nullable();
            $table->string('webhook_url', 255)->nullable();
            $table->timestamps();
        });
    }

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