1
0
Files
services_core/app/Models/NotificationDelivery.php
T
2026-07-31 13:57:11 +07:00

30 lines
729 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class NotificationDelivery extends Model
{
protected $guarded = ['id'];
protected function casts(): array
{
return [
'provider_response' => 'array', 'queued_at' => 'datetime', 'sent_at' => 'datetime',
'delivered_at' => 'datetime', 'read_at' => 'datetime', 'failed_at' => 'datetime',
'next_retry_at' => 'datetime',
];
}
public function message()
{
return $this->belongsTo(NotificationMessage::class, 'notification_message_id');
}
public function channelConfig()
{
return $this->belongsTo(NotificationChannel::class, 'notification_channel_id');
}
}