Decision now support auto mailing
This commit is contained in:
+13
-1
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user