TenantAtlas/app/Models/AlertRuleDestination.php
ahmido 3ed275cef3 feat(alerts): Monitoring cluster + v1 resources (spec 099) (#121)
Implements spec `099-alerts-v1-teams-email`.

- Monitoring navigation: Alerts as a cluster under Monitoring; default landing is Alert deliveries.
- Tenant panel: Alerts points to `/admin/alerts` and the cluster navigation is hidden in tenant panel.
- Guard compliance: removes direct `Gate::` usage from Alert resources so `NoAdHocFilamentAuthPatternsTest` passes.

Verification:
- Full suite: `1348 passed, 7 skipped` (EXIT=0).

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #121
2026-02-18 15:20:43 +00:00

31 lines
621 B
PHP

<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\Pivot;
class AlertRuleDestination extends Pivot
{
protected $table = 'alert_rule_destinations';
protected $guarded = [];
public function workspace(): BelongsTo
{
return $this->belongsTo(Workspace::class);
}
public function alertRule(): BelongsTo
{
return $this->belongsTo(AlertRule::class);
}
public function alertDestination(): BelongsTo
{
return $this->belongsTo(AlertDestination::class);
}
}