*/ #[ORM\OneToMany(mappedBy: 'parentLink', targetEntity: MachineProductLink::class)] private Collection $childLinks; #[ORM\ManyToOne(targetEntity: MachineComponentLink::class, inversedBy: 'productLinks')] #[ORM\JoinColumn(name: 'parentComponentLinkId', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')] private ?MachineComponentLink $parentComponentLink = null; #[ORM\ManyToOne(targetEntity: MachinePieceLink::class, inversedBy: 'productLinks')] #[ORM\JoinColumn(name: 'parentPieceLinkId', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')] private ?MachinePieceLink $parentPieceLink = null; #[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'createdAt')] private DateTimeImmutable $createdAt; #[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'updatedAt')] private DateTimeImmutable $updatedAt; public function __construct() { $this->createdAt = new DateTimeImmutable(); $this->updatedAt = new DateTimeImmutable(); $this->childLinks = new ArrayCollection(); } public function getMachine(): Machine { return $this->machine; } public function setMachine(Machine $machine): static { $this->machine = $machine; return $this; } public function getProduct(): Product { return $this->product; } public function setProduct(Product $product): static { $this->product = $product; return $this; } public function getParentLink(): ?MachineProductLink { return $this->parentLink; } public function setParentLink(?MachineProductLink $parentLink): static { $this->parentLink = $parentLink; return $this; } public function getParentComponentLink(): ?MachineComponentLink { return $this->parentComponentLink; } public function setParentComponentLink(?MachineComponentLink $parentComponentLink): static { $this->parentComponentLink = $parentComponentLink; return $this; } public function getParentPieceLink(): ?MachinePieceLink { return $this->parentPieceLink; } public function setParentPieceLink(?MachinePieceLink $parentPieceLink): static { $this->parentPieceLink = $parentPieceLink; return $this; } }