<?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('general_settings', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('site_name', 40)->nullable();
            $table->string('cur_text', 40)->nullable()->comment('currency text');
            $table->string('cur_sym', 40)->nullable()->comment('currency symbol');
            $table->string('email_from', 40)->nullable();
            $table->text('email_template')->nullable();
            $table->string('sms_body')->nullable();
            $table->string('sms_from')->nullable();
            $table->string('base_color', 40)->nullable();
            $table->string('secondary_color', 40)->nullable();
            $table->text('mail_config')->nullable()->comment('email configuration');
            $table->text('sms_config')->nullable();
            $table->text('global_shortcodes')->nullable();
            $table->boolean('kv')->default(false);
            $table->boolean('ev')->default(false)->comment('email verification, 0 - dont check, 1 - check');
            $table->boolean('en')->default(false)->comment('email notification, 0 - dont send, 1 - send');
            $table->boolean('sv')->default(false)->comment('mobile verication, 0 - dont check, 1 - check');
            $table->boolean('sn')->default(false)->comment('sms notification, 0 - dont send, 1 - send');
            $table->boolean('force_ssl')->default(false);
            $table->boolean('maintenance_mode')->default(false);
            $table->boolean('secure_password')->default(false);
            $table->boolean('agree')->default(false);
            $table->boolean('registration')->default(false)->comment('0: Off	, 1: On');
            $table->string('active_template', 40)->nullable();
            $table->text('system_info')->nullable();
            $table->integer('matrix_height')->default(0);
            $table->integer('matrix_width')->default(0);
            $table->boolean('balance_transfer')->default(false)->comment('Enable : 1, Disable : 0');
            $table->decimal('balance_transfer_fixed_charge', 28, 8)->default(0);
            $table->decimal('balance_transfer_percent_charge', 5)->default(0);
            $table->decimal('epin_charge', 5)->default(0);
            $table->boolean('epin_status')->default(false)->comment('Enable : 1, Disable : 0');
            $table->boolean('language')->default(false);
            $table->timestamps();
        });
    }

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