Add EntityWorkflowStepHold entity to allow workflow to be put on hold by user

Entity created, migration, and repository.
This commit is contained in:
2024-08-07 16:47:29 +02:00
committed by Julien Fastré
parent bf1af1aaad
commit 9475a708c3
3 changed files with 175 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
<?php
namespace Chill\MainBundle\Entity\Workflow;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
#[ORM\Table('chill_main_workflow_entity_step_hold')]
class EntityWorkflowStepHold implements TrackCreationInterface
{
use TrackCreationTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id;
#[ORM\ManyToOne(targetEntity: EntityWorkflowStep::class)]
#[ORM\JoinColumn(nullable: false)]
private EntityWorkflowStep $step;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private User $byUser;
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): void
{
$this->id = $id;
}
public function getStep(): EntityWorkflowStep
{
return $this->step;
}
public function setStep(EntityWorkflowStep $step): void
{
$this->step = $step;
}
public function getByUser(): User
{
return $this->byUser;
}
public function setByUser(User $byUser): void
{
$this->byUser = $byUser;
}
}