<?php
namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        User::firstOrCreate(
            ['email' => 'admin@admin.com'],
            [
                'name'     => 'Administrador',
                'email'    => 'admin@admin.com',
                'password' => Hash::make('admin2026'),
            ]
        );

        $this->command->info('');
        $this->command->info('  ✅ Usuário admin criado:');
        $this->command->info('     E-mail : admin@admin.com');
        $this->command->info('     Senha  : admin2026');
        $this->command->warn('  ⚠️  Altere a senha após o primeiro login!');
        $this->command->info('');
    }
}
