v1.0.0
This commit is contained in:
21
src/app/Models/NotificationSetting.php
Normal file
21
src/app/Models/NotificationSetting.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
#[Fillable(['trigger_key', 'trigger_label', 'enabled', 'recipient', 'email_template_id'])]
|
||||
class NotificationSetting extends Model
|
||||
{
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['enabled' => 'boolean'];
|
||||
}
|
||||
|
||||
public function emailTemplate(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(EmailTemplate::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user