<?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('games', function (Blueprint $table) {
            $table->id();
            $table->foreignId('individual_zone_id')->nullable()->constrained('individual_zones')->onDelete('set null');

            $table->string('main_title')->nullable();
            $table->longText('description')->nullable();
            $table->string('background_color')->nullable();
            $table->string('icon')->nullable();
            $table->json('images')->nullable();

            $table->string('secondary_title')->nullable();
            $table->string('event_tittle')->nullable();
            $table->integer('max_event_count')->nullable();

            $table->string('join_title')->nullable();
            $table->string('button_text')->nullable();
            $table->string('button_color')->nullable();
            $table->string('button_background_color')->nullable();

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

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