<?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::create('payment_methods', function (Blueprint $table) {
            $table->id();
            $table->string('name_ar', 100);
            $table->string('name_en', 100);
            $table->enum('payment_type', ['cash', 'card', 'wallet', 'bank']);
            $table->boolean('is_active')->default(true)->index();
            $table->timestamps();

            $table->unique(['name_ar', 'name_en']);
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('payment_methods');
    }
};
