Mod signature for Prevention remember forms command

This commit is contained in:
philipp lang 2025-05-27 20:07:35 +02:00
parent a482e16739
commit da8dd12dad
1 changed files with 3 additions and 3 deletions

View File

@ -13,18 +13,18 @@ class PreventionRememberAction
{ {
use AsAction; use AsAction;
public string $commandSignature = 'prevention:remember'; public string $commandSignature = 'prevention:remember-forms';
public function handle(): void public function handle(): void
{ {
$query = Participant::whereHas( $query = Participant::whereHas(
'form', 'form',
fn ($form) => $form fn($form) => $form
->where('needs_prevention', true) ->where('needs_prevention', true)
->where('from', '>=', now()) ->where('from', '>=', now())
) )
->where( ->where(
fn ($q) => $q fn($q) => $q
->where('last_remembered_at', '<=', now()->subWeeks(2)) ->where('last_remembered_at', '<=', now()->subWeeks(2))
->orWhereNull('last_remembered_at') ->orWhereNull('last_remembered_at')
); );