Files
backend/app/Models/NotificationPreference.php
T
2026-06-28 12:29:53 +02:00

27 lines
690 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable(['user_id', 'transaction_enabled', 'reminder_enabled', 'marketing_enabled', 'system_enabled'])]
class NotificationPreference extends Model
{
protected function casts(): array
{
return [
'transaction_enabled' => 'boolean',
'reminder_enabled' => 'boolean',
'marketing_enabled' => 'boolean',
'system_enabled' => 'boolean',
];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}