-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
723d360
commit bdaa5a6
Showing
7 changed files
with
94 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
/* Icinga Notifications Web | (c) 2023 Icinga GmbH | GPLv2 */ | ||
|
||
namespace Icinga\Module\Notifications\Model; | ||
|
||
use ipl\Orm\Behavior\Binary; | ||
use ipl\Orm\Behaviors; | ||
use ipl\Orm\Model; | ||
use ipl\Orm\Relations; | ||
|
||
class ObjectIdTag extends Model | ||
{ | ||
public function getTableName(): string | ||
{ | ||
return 'object_id_tag'; | ||
} | ||
|
||
public function getKeyName(): array | ||
{ | ||
return ['object_id', 'tag']; | ||
} | ||
|
||
public function getColumns(): array | ||
{ | ||
return [ | ||
'object_id', | ||
'tag', | ||
'value' | ||
]; | ||
} | ||
|
||
public function createBehaviors(Behaviors $behaviors): void | ||
{ | ||
$behaviors->add(new Binary(['object_id'])); | ||
} | ||
|
||
public function createRelations(Relations $relations): void | ||
{ | ||
$relations->belongsTo('object', Objects::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters