You've already forked symfony-playground
product as OneToOne
This commit is contained in:
25
src/Entity/Platform.php
Normal file
25
src/Entity/Platform.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user