29 lines
733 B
PHP
Executable File
29 lines
733 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Helpdesk\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
final class WorkflowTemplate extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'helpdesk_workflow_templates';
|
|
|
|
/** @var list<string> */
|
|
protected $fillable = ['name', 'event', 'subject', 'html_body', 'text_body', 'to_role', 'cc', 'bcc', 'is_active'];
|
|
|
|
/** @var array<string, string> */
|
|
protected $casts = ['is_active' => 'boolean'];
|
|
|
|
/** @return HasMany<WorkflowLog> */
|
|
public function logs(): HasMany
|
|
{
|
|
return $this->hasMany(WorkflowLog::class, 'template_id');
|
|
}
|
|
}
|