mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
24 lines
441 B
PHP
24 lines
441 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
class Service extends BaseModel
|
||
|
{
|
||
|
public $timestamps = false;
|
||
|
protected $primaryKey = 'service_id';
|
||
|
|
||
|
// ---- Query Scopes ----
|
||
|
|
||
|
public function scopeHasAccess($query, User $user)
|
||
|
{
|
||
|
return $this->hasDeviceAccess($query, $user);
|
||
|
}
|
||
|
|
||
|
// ---- Define Relationships ----
|
||
|
|
||
|
public function device()
|
||
|
{
|
||
|
return $this->belongsTo('App\Models\Device', 'device_id');
|
||
|
}
|
||
|
}
|