verbesserung von benachrichtungen und warnungen an nutzer abgeschlossen. layout editor nun auf gutem stand.

This commit is contained in:
Codex Agent
2025-11-02 11:11:13 +01:00
parent 8e6c66f0db
commit 792b5dfe8b
32 changed files with 1292 additions and 149 deletions

View File

@@ -71,6 +71,11 @@ class Tenant extends Model
return $this->hasOne(TenantPackage::class)->where('active', true);
}
public function notificationLogs(): HasMany
{
return $this->hasMany(TenantNotificationLog::class);
}
public function canCreateEvent(): bool
{
return $this->hasEventAllowance();

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TenantNotificationLog extends Model
{
protected $fillable = [
'tenant_id',
'type',
'channel',
'recipient',
'status',
'context',
'sent_at',
'failed_at',
'failure_reason',
];
protected $casts = [
'context' => 'array',
'sent_at' => 'datetime',
'failed_at' => 'datetime',
];
public function tenant()
{
return $this->belongsTo(Tenant::class);
}
}