Implement Gitea user connection foundation
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user