From 5f0fe9c0103ddb1be96a0b4ed84445f2eac80ef4 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 6 Feb 2026 17:31:41 +0100 Subject: [PATCH] wip --- .../Services/Tasks/Notification/StoreSend.php | 20 ------------------- .../Commands/Services/Tasks/NotifyAlarms.php | 19 +++++++++++++++--- 2 files changed, 16 insertions(+), 23 deletions(-) delete mode 100644 app/Console/Commands/Services/Tasks/Notification/StoreSend.php diff --git a/app/Console/Commands/Services/Tasks/Notification/StoreSend.php b/app/Console/Commands/Services/Tasks/Notification/StoreSend.php deleted file mode 100644 index ef496ef1..00000000 --- a/app/Console/Commands/Services/Tasks/Notification/StoreSend.php +++ /dev/null @@ -1,20 +0,0 @@ - $event_id, - 'user_id' => $user_id, - 'bookmaker_id' => $bookmaker_id, - 'alarm_level_id' => $alarm_level_id, - 'fieldname' => $fieldname, - (string) $sendtype => 1, - ]); - } -} diff --git a/app/Console/Commands/Services/Tasks/NotifyAlarms.php b/app/Console/Commands/Services/Tasks/NotifyAlarms.php index 2f669ca5..a0c27385 100644 --- a/app/Console/Commands/Services/Tasks/NotifyAlarms.php +++ b/app/Console/Commands/Services/Tasks/NotifyAlarms.php @@ -5,7 +5,6 @@ namespace App\Console\Commands\Services\Tasks; use App\Console\Commands\Nuh; use App\Console\Commands\Services\Tasks\Notification\CheckSend; use App\Console\Commands\Services\Tasks\Notification\LoadAlarmEvents; -use App\Console\Commands\Services\Tasks\Notification\StoreSend; use App\Mail\AlarmNotification; use App\Models\Bookmaker; use App\Models\Event; @@ -58,7 +57,14 @@ class NotifyAlarms if (! $send) { - $send = StoreSend::store($event_id, $user_id, $bookmaker_id, $alarm_level_id, $fieldname, 'notify_by_mail'); + $send = PersonalNotificationSend::create([ + 'event_id' => $event_id, + 'user_id' => $user_id, + 'bookmaker_id' => $bookmaker_id, + 'alarm_level_id' => $alarm_level_id, + 'fieldname' => $fieldname, + 'notify_by_mail' => 1, + ]); switch ($alarm_level_id) { case 1: @@ -95,7 +101,14 @@ class NotifyAlarms if (! $send) { - $send = StoreSend::store($event_id, $user_id, $bookmaker_id, $alarm_level_id, $fieldname, 'notify_by_system'); + $send = PersonalNotificationSend::create([ + 'event_id' => $event_id, + 'user_id' => $user_id, + 'bookmaker_id' => $bookmaker_id, + 'alarm_level_id' => $alarm_level_id, + 'fieldname' => $fieldname, + 'notify_by_system' => 1, + ]); switch ($alarm_level_id) { case 1: