'boolean', 'requested_items' => 'array', 'preview' => 'array', 'results' => 'array', 'metadata' => 'array', 'started_at' => 'datetime', 'completed_at' => 'datetime', ]; public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } public function backupSet(): BelongsTo { return $this->belongsTo(BackupSet::class); } public function scopeDeletable($query) { return $query->whereIn('status', ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial']); } public function isDeletable(): bool { return in_array($this->status, ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial'], true); } }