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

@ -6,7 +6,7 @@ use App\Repository\MerParaDTRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MerParaDTRepository::class)]
class MerParaDT extends MerService
class MerParaDT extends MerService implements OttInterface
{
// #[ORM\Id]
// #[ORM\GeneratedValue]
@ -16,10 +16,6 @@ class MerParaDT extends MerService
#[ORM\Column(type: 'string', length: 255)]
private $api_key;
#[ORM\OneToOne(targetEntity: MerDT::class, cascade: ['persist'])]
#[ORM\JoinColumn(nullable: false)]
private MerDT $platform;
// public function getId(): ?int
// {
// return $this->id;
@ -36,16 +32,4 @@ class MerParaDT extends MerService
return $this;
}
public function getPlatform(): ?MerDT
{
return $this->platform;
}
public function setPlatform(?MerDT $platform): self
{
$this->platform = $platform;
return $this;
}
}