<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        $this->call([
            SystemSettingSeeder::class,
            RolePermissionSeeder::class,
            AssociationTypeSeeder::class,
        ]);
        
        // Create main Super Admin user
        \App\Models\User::updateOrCreate(
            ['email' => 'admin@guild360.com'],
            [
                'firstname' => 'Super',
                'surname' => 'Admin',
                'phone' => '08000000000',
                'password' => \Illuminate\Support\Facades\Hash::make('password'),
                'status' => 'active',
            ]
        )->assignRole('Super Admin');
    }
}
