feat: add guest notification center
This commit is contained in:
36
app/Models/GuestNotificationReceipt.php
Normal file
36
app/Models/GuestNotificationReceipt.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\GuestNotificationDeliveryStatus;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class GuestNotificationReceipt extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\GuestNotificationReceiptFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'guest_notification_id',
|
||||
'guest_identifier',
|
||||
'status',
|
||||
'read_at',
|
||||
'dismissed_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'status' => GuestNotificationDeliveryStatus::class,
|
||||
'read_at' => 'datetime',
|
||||
'dismissed_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function notification(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(GuestNotification::class, 'guest_notification_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user