Record used material on tasks and suggest workflow steps' default materials
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -7,16 +7,20 @@ namespace App\Modules\Catalog\Domain\ValueObjects;
|
||||
/**
|
||||
* One step of a workflow template. A task is made of it: the title, the
|
||||
* description and the work type, which is the template's own when
|
||||
* $workTypeId is null.
|
||||
* $workTypeId is null, and the default materials suggested on the task.
|
||||
*/
|
||||
final readonly class WorkflowStep
|
||||
{
|
||||
public ?string $description;
|
||||
|
||||
/**
|
||||
* @param list<WorkflowStepMaterial> $materials
|
||||
*/
|
||||
public function __construct(
|
||||
public WorkflowStepTitle $title,
|
||||
?string $description = null,
|
||||
public ?int $workTypeId = null,
|
||||
public array $materials = [],
|
||||
) {
|
||||
$description = $description === null ? '' : trim($description);
|
||||
$this->description = $description === '' ? null : $description;
|
||||
|
||||
Reference in New Issue
Block a user