Decision now support auto mailing

This commit is contained in:
Simon Pocrnjič
2025-10-12 00:20:03 +02:00
parent 1b615163be
commit 3ab1c05fcc
33 changed files with 1862 additions and 548 deletions
+13 -1
View File
@@ -13,7 +13,14 @@ class Decision extends Model
/** @use HasFactory<\Database\Factories\DecisionFactory> */
use HasFactory;
protected $fillable = ['name', 'color_tag'];
protected $fillable = ['name', 'color_tag', 'auto_mail', 'email_template_id'];
protected function casts(): array
{
return [
'auto_mail' => 'boolean',
];
}
public function actions(): BelongsToMany
{
@@ -29,4 +36,9 @@ public function activities(): HasMany
{
return $this->hasMany(\App\Models\Activity::class);
}
public function emailTemplate(): BelongsTo
{
return $this->belongsTo(\App\Models\EmailTemplate::class, 'email_template_id');
}
}