/ database / factories / VulnerabilityFactory.php
VulnerabilityFactory.php
 1  <?php
 2  
 3  namespace Database\Factories;
 4  
 5  use App\Models\Vulnerability;
 6  use Illuminate\Database\Eloquent\Factories\Factory;
 7  
 8  class VulnerabilityFactory extends Factory
 9  {
10      /**
11       * The name of the factory's corresponding model.
12       *
13       * @var string
14       */
15      protected $model = Vulnerability::class;
16  
17      /**
18       * Define the model's default state.
19       *
20       * @return array<string, mixed>
21       */
22      public function definition()
23      {
24          return [
25              'vid' => $this->faker->unique()->word,
26              'severity' => $this->faker->word,
27              'description' => $this->faker->paragraph,
28              'state' => $this->faker->word,
29              'artifact_name' => $this->faker->word,
30              'artifact_version' => $this->faker->randomDigit,
31              'artifact_type' => $this->faker->word,
32              'source' => $this->faker->url,
33          ];
34      }
35  }