Files

37 lines
718 B
PHP
Raw Permalink Normal View History

2026-03-19 19:47:06 +02:00
<?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);
}
}