<?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('coocon_configs', function (Blueprint $table) {
            $table->id();
            $table->string('name', 100)->comment('설정 이름');
            $table->enum('environment', ['test', 'production'])->default('test')->comment('환경');
            $table->string('api_key', 100)->comment('API 키');
            $table->string('base_url', 255)->comment('API 기본 URL');
            $table->text('description')->nullable()->comment('설명');
            $table->boolean('is_active')->default(false)->comment('활성화 여부');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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