<?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('services', function (Blueprint $table) {
            $table->charset = 'utf8mb4';
            $table->collation = 'utf8mb4_unicode_ci';
            $table->id();
            $table->string('name');
            $table->string('name_arabic')->nullable();
            $table->string('slug');
            $table->string('slug_arabic')->nullable();
            $table->timestamps();
            $table->string('image')->nullable();

            $table->unique('slug', 'services_slug_unique');
            $table->unique('slug_arabic', 'services_slug_arabic_unique');
        });
    }

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