<?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::table('esign_contracts', function (Blueprint $table) {
            $table->string('send_method', 20)->default('alimtalk')->after('status')
                ->comment('발송 방식: alimtalk, email, both');
            $table->boolean('sms_fallback')->default(true)->after('send_method')
                ->comment('SMS 대체발송 사용 여부');
        });
    }

    public function down(): void
    {
        Schema::table('esign_contracts', function (Blueprint $table) {
            $table->dropColumn(['send_method', 'sms_fallback']);
        });
    }
};
