<?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::table('ipaymu_settings', function (Blueprint $table) {
            $table->boolean('broadcast_enabled')->default(true)->after('is_active');
            $table->text('broadcast_message')->nullable()->after('broadcast_enabled');
            $table->integer('broadcast_channel')->default(9)->after('broadcast_message');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('ipaymu_settings', function (Blueprint $table) {
            $table->dropColumn(['broadcast_enabled', 'broadcast_message', 'broadcast_channel']);
        });
    }
};
