mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-11 05:38:59 +02:00
33 lines
659 B
PHP
33 lines
659 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
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 array $validationRules = [
|
|
'name' => ['required', 'string'],
|
|
'fingerprint' => ['required', 'string'],
|
|
'public_key' => ['required', 'string'],
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|