added notif 2

This commit is contained in:
2026-07-23 22:24:39 +03:30
parent 69b7ba69b9
commit eacf5181a9
10 changed files with 376 additions and 16 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
class AppNotification extends Model
{
use SoftDeletes;
protected $table = 'app_notifications';
protected $fillable = [
'title',
'body',
'severity',
'is_active',
'created_by',
];
protected $casts = [
'is_active' => 'boolean',
];
public function reads(): HasMany
{
return $this->hasMany(AppNotificationRead::class, 'notification_id');
}
}