2026-07-23 22:24:39 +03:30
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
|
|
class AppNotificationRead extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $table = 'app_notification_reads';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'notification_id',
|
|
|
|
|
'customer_id',
|
|
|
|
|
'read_at',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'read_at' => 'datetime',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function notification(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(AppNotification::class, 'notification_id');
|
|
|
|
|
}
|
2026-07-24 16:49:42 +03:30
|
|
|
|
|
|
|
|
public function customer(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Customer::class, 'customer_id');
|
|
|
|
|
}
|
2026-07-23 22:24:39 +03:30
|
|
|
}
|