product as OneToOne

This commit is contained in:
2022-05-25 09:54:28 +02:00
parent 937c2a459d
commit 258c79b954
12 changed files with 66 additions and 129 deletions

25
src/Entity/Platform.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\MappedSuperclass]
class Platform
{
#[ORM\OneToOne(targetEntity: "MerService", inversedBy: "platform")]
#[ORM\JoinColumn(name: "ott_id", referencedColumnName: "id")]
private ?MerService $ott;
public function getOtt(): ?MerService
{
return $this->ott;
}
public function setPlatform(?MerService $ott): self
{
$this->ott = $ott;
return $this;
}
}