This commit is contained in:
Stefanescu Mihai
2026-03-19 19:47:06 +02:00
parent e8d2728d57
commit eb735a9a98
19 changed files with 860 additions and 9 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class NotificationPreference extends Model
{
protected $fillable = [
'user_id',
'project_id',
'email_enabled',
'database_enabled',
'muted',
];
protected function casts(): array
{
return [
'email_enabled' => 'boolean',
'database_enabled' => 'boolean',
'muted' => 'boolean',
];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function project(): BelongsTo
{
return $this->belongsTo(Project::class);
}
}