<?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('photobooth_settings', function (Blueprint $table) {
            $table->id();
            $table->unsignedSmallInteger('ftp_port')->default(2121);
            $table->unsignedInteger('rate_limit_per_minute')->default(20);
            $table->unsignedTinyInteger('expiry_grace_days')->default(1);
            $table->boolean('require_ftps')->default(false);
            $table->json('allowed_ip_ranges')->nullable();
            $table->string('control_service_base_url')->nullable();
            $table->string('control_service_token_identifier')->nullable();
            $table->timestamps();
        });
    }

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