forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserSSHKey.php
More file actions
63 lines (55 loc) · 2.29 KB
/
UserSSHKey.php
File metadata and controls
63 lines (55 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Pterodactyl\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* \Pterodactyl\Models\UserSSHKey.
*
* @property int $id
* @property int $user_id
* @property string $name
* @property string $fingerprint
* @property string $public_key
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property \Pterodactyl\Models\User $user
*
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey newQuery()
* @method static \Illuminate\Database\Query\Builder|UserSSHKey onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey query()
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereFingerprint($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey wherePublicKey($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|UserSSHKey withTrashed()
* @method static \Illuminate\Database\Query\Builder|UserSSHKey withoutTrashed()
* @mixin \Eloquent
*
* @method static \Database\Factories\UserSSHKeyFactory factory(...$parameters)
*/
class UserSSHKey extends Model
{
use SoftDeletes;
public const RESOURCE_NAME = 'ssh_key';
protected $table = 'user_ssh_keys';
protected $fillable = [
'name',
'public_key',
'fingerprint',
];
public static $validationRules = [
'name' => ['required', 'string'],
'fingerprint' => ['required', 'string'],
'public_key' => ['required', 'string'],
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}