| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class NotificationTemplate extends Model |
||
| 10 | { |
||
| 11 | protected $table = 'notifier_templates'; |
||
| 12 | protected $fillable = [ |
||
| 13 | 'name', |
||
| 14 | 'event_key', |
||
| 15 | 'subject', |
||
| 16 | 'content', |
||
| 17 | 'variables', |
||
| 18 | 'is_active', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | protected $casts = [ |
||
| 22 | 'variables' => 'array', |
||
| 23 | 'is_active' => 'boolean', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | public function event(): BelongsTo |
||
| 27 | { |
||
| 28 | return $this->belongsTo(NotificationEvent::class, 'event_key', 'key'); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function notifications(): HasMany |
||
| 34 | } |
||
| 35 | } |
||
| 36 |