<?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('paid_account_payment_methods', function (Blueprint $table) {
            $table->id();
            $table->string('company_id')->index();
            $table->string('code')->default('');
            $table->string('type')->default('');
            $table->binary('image')->nullable();
            $table->string('description')->default('');
            $table->boolean('need_ref')->default(false);
            $table->boolean('open_drawer')->default(false);
            $table->string('text_color')->default('');
            $table->string('base_color')->default('');
            $table->boolean('use_terminal')->default(false);
            $table->string('terminal_id')->default('');
            $table->string('refund_pin')->default('');
            $table->string('store_id')->default('');
            $table->string('client_id')->default('');
            $table->string('client_key')->default('');
            $table->text('private_key')->nullable();
            $table->text('public_key')->nullable();
            $table->boolean('used_credit_card')->default(false);
            $table->boolean('used_ewallet')->default(false);
            $table->timestamps();
        });
    }

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