From 5eee45a29c8df597f856f56aa023ede9f0b876d2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 10 Mar 2020 13:23:51 +0100 Subject: [PATCH] Introduce class `FlappingHistory` --- library/Icingadb/Model/FlappingHistory.php | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 library/Icingadb/Model/FlappingHistory.php diff --git a/library/Icingadb/Model/FlappingHistory.php b/library/Icingadb/Model/FlappingHistory.php new file mode 100644 index 00000000..a3509e63 --- /dev/null +++ b/library/Icingadb/Model/FlappingHistory.php @@ -0,0 +1,61 @@ +add(new Timestamp([ + 'start_time', + 'end_time' + ])); + } + + public function createRelations(Relations $relations) + { + $relations->belongsTo('endpoint', Endpoint::class); + $relations->belongsTo('environment', Environment::class); + $relations->belongsTo('host', Host::class); + $relations->belongsTo('service', Service::class)->setJoinType('LEFT'); + } +}