<?php

namespace Database\Seeders;

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

class SuperAdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $user = User::create([
            'id' => 1,
            'name' => 'Super Admin',
            'email' => 'super@atlancis.com',
            'password' => bcrypt('Iprs@2024'),
        ]);

        $role = Role::where('name', 'super admin')->first();
        $user->assignRole($role);
    }
}
