<?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('barobill_settings', function (Blueprint $table) {
            // 서비스 이용 옵션
            $table->boolean('use_tax_invoice')->default(false)->after('auto_issue')->comment('전자세금계산서 이용');
            $table->boolean('use_bank_account')->default(false)->after('use_tax_invoice')->comment('계좌조회 이용');
            $table->boolean('use_card_usage')->default(false)->after('use_bank_account')->comment('카드사용내역 이용');
            $table->boolean('use_hometax')->default(false)->after('use_card_usage')->comment('홈텍스매입/매출 이용');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('barobill_settings', function (Blueprint $table) {
            $table->dropColumn(['use_tax_invoice', 'use_bank_account', 'use_card_usage', 'use_hometax']);
        });
    }
};
