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

View File

@ -3,6 +3,7 @@
namespace App\Entity;
use App\Repository\MerServiceRepository;
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\ORM\Mapping as ORM;
#[ORM\InheritanceType('SINGLE_TABLE')]
@ -26,6 +27,9 @@ abstract class MerService
#[ORM\Column(type: 'json', nullable: true)]
private $metadata = [];
#[ORM\OneToOne(targetEntity: Platform::class, cascade: ['persist'], mappedBy: 'ott')]
private Platform $platform;
public function getId(): ?int
{
return $this->id;
@ -54,4 +58,16 @@ abstract class MerService
return $this;
}
public function getPlatform(): ?Platform
{
return $this->platform;
}
public function setPlatform(?Platform $platform): self
{
$this->platform = $platform;
return $this;
}
}