<?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::table('settings', function (Blueprint $table) {
            $table->string('hero_image')->nullable()->after('logo');
            $table->integer('total_students')->default(500)->after('vision');
            $table->integer('total_teachers')->default(30)->after('total_students');
            $table->integer('total_classes')->default(15)->after('total_teachers');
            $table->integer('total_years')->default(10)->after('total_classes');
        });
    }

    public function down(): void
    {
        Schema::table('settings', function (Blueprint $table) {
            $table->dropColumn(['hero_image', 'total_students', 'total_teachers', 'total_classes', 'total_years']);
        });
    }
};