From a0901c4b7f2db488cb4fb3be2dd921a0308f4659 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:36:40 +0200 Subject: Adding upstream version 1.0.2. Signed-off-by: Daniel Baumann --- library/Icingadb/Model/UsergroupCustomvar.php | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 library/Icingadb/Model/UsergroupCustomvar.php (limited to 'library/Icingadb/Model/UsergroupCustomvar.php') diff --git a/library/Icingadb/Model/UsergroupCustomvar.php b/library/Icingadb/Model/UsergroupCustomvar.php new file mode 100644 index 0000000..ab97273 --- /dev/null +++ b/library/Icingadb/Model/UsergroupCustomvar.php @@ -0,0 +1,52 @@ +add(new Binary([ + 'id', + 'usergroup_id', + 'customvar_id', + 'environment_id' + ])); + } + + public function createRelations(Relations $relations) + { + $relations->belongsTo('environment', Environment::class); + $relations->belongsTo('usergroup', Usergroup::class); + $relations->belongsTo('customvar', Customvar::class); + $relations->belongsTo('customvar_flat', CustomvarFlat::class) + ->setCandidateKey('customvar_id') + ->setForeignKey('customvar_id'); + } +} -- cgit v1.2.3