33 lines
847 B
PHP
33 lines
847 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Actions\Git\GitProviderKey;
|
|
use App\Models\User;
|
|
use App\Models\UserGitConnection;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<UserGitConnection>
|
|
*/
|
|
class UserGitConnectionFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'account_login' => fake()->userName(),
|
|
'account_name' => fake()->name(),
|
|
'api_token' => 'gitea-token-'.fake()->uuid(),
|
|
'base_url' => 'https://git.'.fake()->domainName(),
|
|
'provider' => GitProviderKey::Gitea,
|
|
'provider_user_id' => (string) fake()->numberBetween(1, 999_999),
|
|
'user_id' => User::factory(),
|
|
];
|
|
}
|
|
}
|