This commit is contained in:
Codex
2026-07-10 09:14:42 -05:00
parent e27fcc6c19
commit 63820994f8
55 changed files with 2195 additions and 86 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Model;
#[Fillable([
'user_id', 'job_alerts', 'quote_updates', 'work_order_updates',
'review_updates', 'dispute_updates', 'email_enabled', 'push_enabled',
])]
class NotificationPreference extends Model
{
protected function casts(): array
{
return [
'job_alerts' => 'boolean',
'quote_updates' => 'boolean',
'work_order_updates' => 'boolean',
'review_updates' => 'boolean',
'dispute_updates' => 'boolean',
'email_enabled' => 'boolean',
'push_enabled' => 'boolean',
];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}