This commit is contained in:
Mark Gregory
2026-07-24 11:02:38 +01:00
parent 3f87bea5f9
commit 9825a0ab0e
23 changed files with 103 additions and 6 deletions
@@ -0,0 +1,4 @@
<?php
namespace Modules\Workflow\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany;
final class WorkflowDefinition extends Model { protected $fillable=['name','slug','description','subject_type','is_active']; protected function casts(): array { return ['is_active'=>'boolean']; } public function stages(): HasMany { return $this->hasMany(WorkflowStage::class)->orderBy('position'); } public function transitions(): HasMany { return $this->hasMany(WorkflowTransition::class); } }