first commit from hostslim
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user