<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        $this->call(RoleSeeder::class);

        // User::factory(10)->create();

        $user = User::factory()->create([
            'name' => 'Administrateur',
            'email' => 'admin@example.com',
            'matricule' => 'ADM-001',
        ]);

        $superAdmin = User::factory()->create([
            'name' => 'Super Administrateur',
            'email' => 'super@admin.com',
            'matricule' => 'ADM-002',
        ]);

        $user->assignRole('Administrateur');
        $superAdmin->assignRole('Super Administrateur');
    }
}