engelsystem/db/factories/OAuthFactory.php

31 lines
844 B
PHP
Raw Normal View History

2023-04-01 14:23:52 +02:00
<?php
declare(strict_types=1);
namespace Database\Factories\Engelsystem\Models;
use Engelsystem\Models\OAuth;
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-11-06 23:50:07 +01: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(),
'expires_at' => $this->faker->dateTimeInInterval('+5 days', '+3 months')->format('Y-m-d'),
2023-04-01 14:23:52 +02:00
];
}
}