34 lines
1009 B
PHP
34 lines
1009 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Traits\LogsActivity;
|
|
|
|
class VpnConfig extends Model
|
|
{
|
|
//protected $guarded = ['id'];
|
|
use LogsActivity;
|
|
protected $fillable = [
|
|
'partner_name', 'peer_ip', 'local_ip',
|
|
'local_device', 'peer_device',
|
|
'encryption_domain_local', 'encryption_domain_remote',
|
|
'preshared_key', 'status',
|
|
'ike_version', 'phase1_encryption', 'phase1_hash', 'phase1_dh_group', 'phase1_lifetime',
|
|
'phase2_encryption', 'phase2_hash', 'phase2_dh_group', 'phase2_lifetime', 'pfs_enabled'
|
|
];
|
|
protected $casts = [
|
|
'preshared_key' => 'encrypted',
|
|
];
|
|
|
|
public function client_info(){
|
|
return $this->hasOne('App\Models\Client', 'id', 'client_id');
|
|
}
|
|
public function mno_info(){
|
|
return $this->hasOne('App\Models\NetworkOps', 'id', 'mno_id');
|
|
}
|
|
public function userInfo(){
|
|
return $this->hasOne('App\Models\StaffMember', 'id', 'user_id');
|
|
}
|
|
}
|