<?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('surahs', function (Blueprint $table) {
            $table->id();
            $table->integer('surah_no')->unique();
            $table->string('surah_name');
            $table->string('surah_name_arabic');
            $table->string('surah_name_arabic_long')->nullable();
            $table->string('surah_name_translation');
            $table->string('revelation_place'); // Mecca or Madina
            $table->integer('total_ayah');
            $table->json('audio')->nullable(); // Store audio URLs as JSON
            $table->timestamps();
        });
    }

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