<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    public function run(): void
    {
        $count = max(0, (int) config('database.seeders.user_count', 0));

        if ($count > 0 && User::query()->doesntExist()) {
            User::factory()->count($count)->create();
        }
    }
}
