src/Entity/FlowProcess.php line 24
<?phpnamespace App\Entity;use ApiPlatform\Metadata\ApiResource;use ApiPlatform\Metadata\Get;use ApiPlatform\Metadata\GetCollection;use App\Repository\FlowProcessRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;#[ApiResource(operations: [new GetCollection(),new Get(normalizationContext: ['groups' => ['flow:list', 'flow:view']]),],normalizationContext: ['groups' => ['flow:list']])]#[ORM\Entity(repositoryClass: FlowProcessRepository::class)]class FlowProcess{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]#[Groups(['flow:list'])]private ?int $id = null;#[ORM\Column(length: 255)]#[Groups(['flow:list'])]private ?string $name = null;#[ORM\OneToMany(mappedBy: 'flowProcess', targetEntity: FlowStep::class)]private Collection $step;public function __construct(){$this->step = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}/*** @return Collection<int, FlowStep>*/public function getStep(): Collection{return $this->step;}public function addStep(FlowStep $step): self{if (!$this->step->contains($step)) {$this->step->add($step);$step->setFlowProcess($this);}return $this;}public function removeStep(FlowStep $step): self{if ($this->step->removeElement($step)) {// set the owning side to null (unless already changed)if ($step->getFlowProcess() === $this) {$step->setFlowProcess(null);}}return $this;}}