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'); + } +}