phase 4
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user