<?php

namespace Database\Seeders;

use App\Modules\Core\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
    {
        // User::factory(10)->create();

        User::firstOrCreate(
            ['username' => 'admin'],
            [
                'name' => '系統管理員',
                'email' => 'admin@example.com',
                'password' => 'password',
                'is_active' => true,
            ]
        );

        $this->call(PermissionSeeder::class);


    }
}
