<?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('settings', function (Blueprint $table) {
            $table->id();
            $table->string('congregazione_nome')->nullable();
            $table->string('logo_path')->nullable();
            $table->unsignedInteger('giorni_giacenza_da_assegnare')->default(120);
            $table->unsignedInteger('giorni_giacenza_prioritari')->default(180);
            $table->unsignedInteger('giorni_per_smarrito')->default(120);
            $table->unsignedInteger('home_limit_list')->default(10);
            $table->unsignedInteger('audit_retention_days')->default(730);
            $table->boolean('setup_completed')->default(false);
            $table->timestamps();
        });
    }

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