|
10 | 10 | use Illuminate\Database\Eloquent\Builder; |
11 | 11 | use Illuminate\Auth\Passwords\CanResetPassword; |
12 | 12 | use Pterodactyl\Traits\Helpers\AvailableLanguages; |
| 13 | +use Illuminate\Database\Eloquent\Relations\HasMany; |
13 | 14 | use Illuminate\Foundation\Auth\Access\Authorizable; |
14 | 15 | use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; |
15 | 16 | use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; |
16 | 17 | use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; |
17 | 18 | use Pterodactyl\Notifications\SendPasswordReset as ResetPasswordNotification; |
18 | 19 |
|
19 | 20 | /** |
| 21 | + * \Pterodactyl\Models\User. |
| 22 | + * |
20 | 23 | * @property int $id |
21 | 24 | * @property string|null $external_id |
22 | 25 | * @property string $uuid |
|
38 | 41 | * @property \Pterodactyl\Models\ApiKey[]|\Illuminate\Database\Eloquent\Collection $apiKeys |
39 | 42 | * @property \Pterodactyl\Models\Server[]|\Illuminate\Database\Eloquent\Collection $servers |
40 | 43 | * @property \Pterodactyl\Models\RecoveryToken[]|\Illuminate\Database\Eloquent\Collection $recoveryTokens |
| 44 | + * @property string|null $remember_token |
| 45 | + * @property int|null $api_keys_count |
| 46 | + * @property \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications |
| 47 | + * @property int|null $notifications_count |
| 48 | + * @property int|null $recovery_tokens_count |
| 49 | + * @property int|null $servers_count |
| 50 | + * @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\UserSSHKey[] $sshKeys |
| 51 | + * @property int|null $ssh_keys_count |
| 52 | + * |
| 53 | + * @method static \Database\Factories\UserFactory factory(...$parameters) |
| 54 | + * @method static Builder|User newModelQuery() |
| 55 | + * @method static Builder|User newQuery() |
| 56 | + * @method static Builder|User query() |
| 57 | + * @method static Builder|User whereCreatedAt($value) |
| 58 | + * @method static Builder|User whereEmail($value) |
| 59 | + * @method static Builder|User whereExternalId($value) |
| 60 | + * @method static Builder|User whereGravatar($value) |
| 61 | + * @method static Builder|User whereId($value) |
| 62 | + * @method static Builder|User whereLanguage($value) |
| 63 | + * @method static Builder|User whereNameFirst($value) |
| 64 | + * @method static Builder|User whereNameLast($value) |
| 65 | + * @method static Builder|User wherePassword($value) |
| 66 | + * @method static Builder|User whereRememberToken($value) |
| 67 | + * @method static Builder|User whereRootAdmin($value) |
| 68 | + * @method static Builder|User whereTotpAuthenticatedAt($value) |
| 69 | + * @method static Builder|User whereTotpSecret($value) |
| 70 | + * @method static Builder|User whereUpdatedAt($value) |
| 71 | + * @method static Builder|User whereUseTotp($value) |
| 72 | + * @method static Builder|User whereUsername($value) |
| 73 | + * @method static Builder|User whereUuid($value) |
| 74 | + * @mixin \Eloquent |
41 | 75 | */ |
42 | 76 | class User extends Model implements |
43 | 77 | AuthenticatableContract, |
@@ -225,6 +259,11 @@ public function recoveryTokens() |
225 | 259 | return $this->hasMany(RecoveryToken::class); |
226 | 260 | } |
227 | 261 |
|
| 262 | + public function sshKeys(): HasMany |
| 263 | + { |
| 264 | + return $this->hasMany(UserSSHKey::class); |
| 265 | + } |
| 266 | + |
228 | 267 | /** |
229 | 268 | * Returns all of the servers that a user can access by way of being the owner of the |
230 | 269 | * server, or because they are assigned as a subuser for that server. |
|
0 commit comments