2021-06-29 00:27:57 +02:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-06-29 00:27:57 +02:00
|
|
|
namespace Database\Factories\Engelsystem\Models\User;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Engelsystem\Models\User\PersonalData;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class PersonalDataFactory extends Factory
|
|
|
|
{
|
|
|
|
/** @var string */
|
2022-12-15 19:50:56 +01:00
|
|
|
protected $model = PersonalData::class; // phpcs:ignore
|
2021-06-29 00:27:57 +02:00
|
|
|
|
2022-12-14 19:15:20 +01:00
|
|
|
public function definition(): array
|
2021-06-29 00:27:57 +02:00
|
|
|
{
|
|
|
|
$arrival = $this->faker->optional()->dateTimeThisMonth('2 weeks');
|
|
|
|
$departure = $this->faker->optional()->dateTimeThisMonth('2 weeks');
|
|
|
|
|
|
|
|
return [
|
|
|
|
'first_name' => $this->faker->optional(.7)->firstName(),
|
|
|
|
'last_name' => $this->faker->optional()->lastName(),
|
|
|
|
'pronoun' => $this->faker->optional(.3)->pronoun(),
|
|
|
|
'shirt_size' => $this->faker->optional(.9)->shirtSize(),
|
|
|
|
'planned_arrival_date' => $arrival ? Carbon::instance($arrival) : null,
|
|
|
|
'planned_departure_date' => $departure ? Carbon::instance($departure) : null,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|