<?php

namespace Database\Factories;

use App\Models\SecurityRule;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/** @extends Factory<SecurityRule> */
class SecurityRuleFactory extends Factory
{
    protected $model = SecurityRule::class;

    public function definition(): array
    {
        $name = fake()->unique()->words(3, true);

        return [
            'rule_name' => Str::title($name),
            'rule_code' => Str::slug($name, '_'),
            'rule_description' => fake()->sentence(),
            'is_enabled' => true,
            'priority' => fake()->numberBetween(10, 500),
            'trigger_delay' => 0,
            'risk_level' => 'medium',
            'notify_owner' => true,
            'notify_admin' => true,
            'is_system' => false,
        ];
    }
}
