option('days'); $isDryRun = $this->option('dry-run'); $cutoff = now()->subDays($days); $query = PressRelease::withoutGlobalScopes() ->where('status', PressReleaseStatus::Draft->value) ->where('updated_at', '<', $cutoff); $count = $query->count(); if ($isDryRun) { $this->warn("[DRY-RUN] {$count} Entwürfe würden archiviert. Kein tatsächlicher Vorgang."); return self::SUCCESS; } $query->update(['status' => PressReleaseStatus::Archived->value]); $this->info("PM-Entwürfe archiviert: {$count} Einträge."); return self::SUCCESS; } }