belongsTo(Service::class); } public function application() { return $this->belongsTo(Application::class); } public function latest_log(): HasOne { return $this->hasOne(ScheduledTaskExecution::class)->latest(); } public function executions(): HasMany { return $this->hasMany(ScheduledTaskExecution::class); } }