29 lines
522 B
PHP
29 lines
522 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class UserServerPermission extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'server_resource_id',
|
|
'can_ssh',
|
|
'can_sftp',
|
|
'can_rdp',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'can_ssh' => 'boolean',
|
|
'can_sftp' => 'boolean',
|
|
'can_rdp' => 'boolean',
|
|
];
|
|
}
|
|
}
|