Add guest push notifications and queue alerts

This commit is contained in:
Codex Agent
2025-11-12 20:38:49 +01:00
parent 2c412e3764
commit 574aa47ce7
34 changed files with 1806 additions and 74 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class PushSubscription extends Model
{
use HasFactory;
protected $fillable = [
'tenant_id',
'event_id',
'guest_identifier',
'device_id',
'endpoint',
'endpoint_hash',
'public_key',
'auth_token',
'content_encoding',
'status',
'expires_at',
'last_seen_at',
'last_notified_at',
'last_failed_at',
'failure_count',
'language',
'user_agent',
'meta',
];
protected $casts = [
'expires_at' => 'datetime',
'last_seen_at' => 'datetime',
'last_notified_at' => 'datetime',
'last_failed_at' => 'datetime',
'meta' => 'array',
];
public function event(): BelongsTo
{
return $this->belongsTo(Event::class);
}
public function tenant(): BelongsTo
{
return $this->belongsTo(Tenant::class);
}
}