<?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::create('payment_settings', function (Blueprint $table): void {
            $table->id();
            $table->string('default_currency', 3)->default('EUR');
            $table->boolean('create_activity_on_payment')->default(false);
            $table->foreignId('default_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
            $table->foreignId('default_action_id')->nullable()->constrained('actions')->nullOnDelete();
            $table->string('activity_note_template', 255)->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('payment_settings');
    }
};
