mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-04 17:03:33 -04:00
35 lines
706 B
PHP
35 lines
706 B
PHP
<?php
|
|
|
|
namespace Icinga\Module\Eagle\Model;
|
|
|
|
use ipl\Orm\Model;
|
|
use ipl\Orm\Relations;
|
|
|
|
class ServicegroupMember extends Model
|
|
{
|
|
public function getTableName()
|
|
{
|
|
return 'servicegroup_member';
|
|
}
|
|
|
|
public function getKeyName()
|
|
{
|
|
return 'id';
|
|
}
|
|
|
|
public function getColumns()
|
|
{
|
|
return [
|
|
'service_id',
|
|
'servicegroup_id',
|
|
'environment_id'
|
|
];
|
|
}
|
|
|
|
public function createRelations(Relations $relations)
|
|
{
|
|
$relations->belongsTo('environment', Environment::class);
|
|
$relations->belongsTo('servicegroup', Servicegroup::class);
|
|
$relations->belongsTo('service', Service::class);
|
|
}
|
|
}
|