Files
analytics/app/Models/AlertNotification.php
2026-03-24 21:12:21 +01:00

30 lines
527 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class AlertNotification extends Model
{
protected $fillable = [
'alert_id',
'value',
'message',
'is_read',
];
protected function casts(): array
{
return [
'value' => 'decimal:2',
'is_read' => 'boolean',
];
}
public function alert(): BelongsTo
{
return $this->belongsTo(Alert::class);
}
}