Files
services_core/app/Models/UserNotification.php
T
2026-08-01 11:42:42 +07:00

26 lines
471 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UserNotification extends Model
{
protected $guarded = ['id'];
protected function casts(): array
{
return ['read_at' => 'datetime'];
}
public function user()
{
return $this->belongsTo(User::class);
}
public function campaign()
{
return $this->belongsTo(SystemNotificationCampaign::class, 'system_notification_campaign_id');
}
}