major update

This commit is contained in:
2026-03-04 15:56:58 +01:00
parent 16759a2732
commit 8f4dd5840d
478 changed files with 24313 additions and 8201 deletions

View File

@@ -2,6 +2,7 @@
namespace MintyPHP\Repository\Mail;
use MintyPHP\Domain\Taxonomy\MailLogStatus;
use MintyPHP\DB;
use MintyPHP\Repository\Support\RepoQuery;
@@ -14,7 +15,7 @@ class MailLogRepository
$data['to_email'],
$data['subject'],
$data['template'] ?? null,
$data['status'] ?? 'queued'
$data['status'] ?? MailLogStatus::Queued->value
);
return $id ? (int) $id : null;
}
@@ -23,7 +24,7 @@ class MailLogRepository
{
$result = DB::update(
'update mail_log set status = ?, sent_at = NOW(), provider_message_id = ?, error_message = NULL where id = ?',
'sent',
MailLogStatus::Sent->value,
$providerMessageId,
(string) $id
);
@@ -34,7 +35,7 @@ class MailLogRepository
{
$result = DB::update(
'update mail_log set status = ?, error_message = ? where id = ?',
'failed',
MailLogStatus::Failed->value,
$errorMessage,
(string) $id
);
@@ -44,7 +45,7 @@ class MailLogRepository
public function listPaged(array $options): array
{
$search = trim((string) ($options['search'] ?? ''));
$status = trim((string) ($options['status'] ?? ''));
$status = MailLogStatus::tryNormalize((string) ($options['status'] ?? ''))?->value ?? '';
$createdFrom = trim((string) ($options['created_from'] ?? ''));
$createdTo = trim((string) ($options['created_to'] ?? ''));