mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Add EntityWorkflowStepHold entity to allow workflow to be put on hold by user
Entity created, migration, and repository.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user