mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-04-11 20:06:14 -04:00
20 lines
507 B
PHP
20 lines
507 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
/* Icinga DB Web | (c) 2023 Icinga GmbH | GPLv2 */
|
||
|
|
|
||
|
|
namespace Icinga\Module\Icingadb\Model;
|
||
|
|
|
||
|
|
use ipl\Orm\Relations;
|
||
|
|
|
||
|
|
class LastServiceComment extends Comment
|
||
|
|
{
|
||
|
|
public function createRelations(Relations $relations): void
|
||
|
|
{
|
||
|
|
$relations->belongsTo('environment', Environment::class);
|
||
|
|
$relations->belongsTo('zone', Zone::class);
|
||
|
|
$relations->belongsTo('state', ServiceState::class)
|
||
|
|
->setForeignKey('last_comment_id')
|
||
|
|
->setCandidateKey('id');
|
||
|
|
}
|
||
|
|
}
|