'array', 'findings' => 'array', 'changes' => 'array', 'report' => 'array', 'started_at' => 'datetime', 'completed_at' => 'datetime', ]; public function workspace(): BelongsTo { return $this->belongsTo(Workspace::class); } public function fleetNode(): BelongsTo { return $this->belongsTo(FleetNode::class); } public function scopePendingForNode(Builder $query, FleetNode $node): Builder { return $query->where('fleet_node_id', $node->id) ->whereIn('status', [self::STATUS_ASSIGNED, self::STATUS_QUEUED]) ->orderBy('created_at'); } }