mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 21:26:52 +01: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);
 | |
|     }
 | |
| }
 | 
