Files
services_core/app/Models/NotificationChannel.php
T
2026-07-31 13:57:11 +07:00

34 lines
672 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class NotificationChannel extends Model
{
protected $guarded = ['id'];
protected $hidden = ['credentials'];
protected function casts(): array
{
return [
'enabled' => 'boolean',
'is_default' => 'boolean',
'credentials' => 'encrypted:array',
'settings' => 'array',
'last_health_check_at' => 'datetime',
];
}
public function tenant()
{
return $this->belongsTo(Tenant::class);
}
public function templates()
{
return $this->hasMany(NotificationTemplate::class);
}
}