<?php

namespace Database\Seeders;

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

class AdminUserSeeder extends Seeder
{
    public function run(): void
    {
        $admin = User::firstOrCreate(
            ['email' => 'admin@biosupplyuk.com'],
            [
                'name'            => 'Admin',
                'password'        => Hash::make('admin1234'),
                'age_verified_at' => now(),
            ]
        );

        $admin->assignRole('admin');

        $this->command->info('Admin user created: admin@biosupplyuk.com / admin1234');
    }
}
