mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-04-14 05:16:35 -04:00
37 lines
748 B
PHP
37 lines
748 B
PHP
<?php
|
|
|
|
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
|
|
|
|
namespace Icinga\Module\Icingadb\Model;
|
|
|
|
use ipl\Orm\Model;
|
|
use ipl\Orm\Relations;
|
|
|
|
class NotificationUser extends Model
|
|
{
|
|
public function getTableName()
|
|
{
|
|
return 'notification_user';
|
|
}
|
|
|
|
public function getKeyName()
|
|
{
|
|
return 'id';
|
|
}
|
|
|
|
public function getColumns()
|
|
{
|
|
return [
|
|
'notification_id',
|
|
'user_id',
|
|
'environment_id'
|
|
];
|
|
}
|
|
|
|
public function createRelations(Relations $relations)
|
|
{
|
|
$relations->belongsTo('environment', Environment::class);
|
|
$relations->belongsTo('notification', Notification::class);
|
|
$relations->belongsTo('user', User::class);
|
|
}
|
|
}
|