diff --git a/library/Eagle/Model/StateHistory.php b/library/Eagle/Model/StateHistory.php new file mode 100644 index 00000000..dfaf3663 --- /dev/null +++ b/library/Eagle/Model/StateHistory.php @@ -0,0 +1,58 @@ +add(new Timestamp([ + 'event_time' + ])); + } + + public function createRelations(Relations $relations) + { + $relations->belongsTo('endpoint', Endpoint::class); + $relations->belongsTo('environment', Environment::class); + $relations->belongsTo('host', Host::class)->setJoinType('LEFT'); + $relations->belongsTo('service', Service::class)->setJoinType('LEFT'); + } +}