mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-04-22 06:38:43 -04:00
35 lines
661 B
PHP
35 lines
661 B
PHP
<?php
|
|
|
|
namespace Icinga\Module\Icingadb\Model;
|
|
|
|
use ipl\Orm\Model;
|
|
use ipl\Orm\Relations;
|
|
|
|
class IconImage extends Model
|
|
{
|
|
public function getTableName()
|
|
{
|
|
return 'icon_image';
|
|
}
|
|
|
|
public function getKeyName()
|
|
{
|
|
return ['environment_id', 'id'];
|
|
}
|
|
|
|
public function getColumns()
|
|
{
|
|
return [
|
|
'icon_image',
|
|
'environment_id'
|
|
];
|
|
}
|
|
|
|
public function createRelations(Relations $relations)
|
|
{
|
|
$relations->belongsTo('environment', Environment::class);
|
|
|
|
$relations->hasMany('host', Host::class);
|
|
$relations->hasMany('service', Service::class);
|
|
}
|
|
}
|