2023-04-01 14:23:52 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Database\Factories\Engelsystem\Models;
|
|
|
|
|
|
|
|
use Engelsystem\Models\OAuth;
|
2023-10-24 23:00:04 +02:00
|
|
|
use Engelsystem\Models\User\User;
|
2023-04-01 14:23:52 +02:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class OAuthFactory extends Factory
|
|
|
|
{
|
|
|
|
/** @var class-string */
|
|
|
|
protected $model = OAuth::class; // phpcs:ignore
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array<string, mixed>
|
|
|
|
*/
|
|
|
|
public function definition(): array
|
|
|
|
{
|
|
|
|
return [
|
2023-10-24 23:00:04 +02:00
|
|
|
'user_id' => User::factory(),
|
|
|
|
'provider' => $this->faker->unique()->word(),
|
2023-04-01 14:23:52 +02:00
|
|
|
'identifier' => $this->faker->unique()->word(),
|
|
|
|
'access_token' => $this->faker->unique()->word(),
|
|
|
|
'refresh_token' => $this->faker->unique()->word(),
|
2023-10-24 23:00:04 +02:00
|
|
|
'expires_at' => $this->faker->dateTimeInInterval('+5 days', '+3 months')->format('Y-m-d'),
|
2023-04-01 14:23:52 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|