<?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('village_profiles', function (Blueprint $table) {
            $table->id();

            $table->string('name')->nullable();           // nama desa
            $table->string('tagline')->nullable();        // tagline desa
            $table->longText('description')->nullable();  // deskripsi desa

            $table->unsignedBigInteger('population')->nullable(); // jumlah penduduk
            $table->decimal('area_km2', 10, 2)->nullable();        // luas wilayah (km2)
            $table->string('address')->nullable();                // alamat desa

            $table->unsignedSmallInteger('hamlet_count')->nullable(); // berapa dusun

            // Video pengenalan (YouTube URL)
            $table->text('youtube_url')->nullable();

            // Kontak desa
            $table->string('phone')->nullable(); // nomor desa
            $table->string('email')->nullable();

            $table->timestamps();
        });
    }

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