2024-02-08 20:29:46 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories\Form\Models;
|
|
|
|
|
|
|
|
use App\Form\Models\Participant;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use Tests\Feature\Form\FormtemplateSectionRequest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @extends Factory<Participant>
|
|
|
|
*/
|
|
|
|
class ParticipantFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
2024-02-09 00:21:33 +01:00
|
|
|
* @var class-string<Participant>
|
2024-02-08 20:29:46 +01:00
|
|
|
*/
|
|
|
|
protected $model = Participant::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array<string, mixed>
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'data' => [],
|
2024-06-19 23:51:20 +02:00
|
|
|
'parent_id' => null,
|
2024-02-08 20:29:46 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2024-02-08 21:04:00 +01:00
|
|
|
/**
|
|
|
|
* @param array<string, mixed> $data
|
|
|
|
*/
|
|
|
|
public function data(array $data): self
|
|
|
|
{
|
|
|
|
return $this->state(['data' => $data]);
|
|
|
|
}
|
2024-02-20 01:14:26 +01:00
|
|
|
|
|
|
|
public function nr(int $number): self
|
|
|
|
{
|
|
|
|
return $this->state(['mitgliedsnr' => $number]);
|
|
|
|
}
|
2024-02-08 20:29:46 +01:00
|
|
|
}
|