You've already forked symfony-playground
not working
This commit is contained in:
@ -8,8 +8,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\Entity(repositoryClass: MerBeDMRepository::class)]
|
||||
class MerBeDM extends MerService
|
||||
{
|
||||
use MerDM;
|
||||
|
||||
// #[ORM\Id]
|
||||
// #[ORM\GeneratedValue]
|
||||
// #[ORM\Column(type: 'integer')]
|
||||
@ -18,6 +16,10 @@ class MerBeDM extends MerService
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $activation_code;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: MerDM::class, cascade: ['persist'])]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private MerDM $platform;
|
||||
|
||||
// public function getId(): ?int
|
||||
// {
|
||||
// return $this->id;
|
||||
@ -34,4 +36,16 @@ class MerBeDM extends MerService
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPlatform(): ?MerDM
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
public function setPlatform(?MerDM $platform): self
|
||||
{
|
||||
$this->platform = $platform;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@ -5,21 +5,21 @@ namespace App\Entity;
|
||||
use App\Repository\MerDMRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
//#[ORM\Entity(repositoryClass: MerDMRepository::class)]
|
||||
trait MerDM
|
||||
#[ORM\Entity(repositoryClass: MerDMRepository::class)]
|
||||
class MerDM
|
||||
{
|
||||
// #[ORM\Id]
|
||||
// #[ORM\GeneratedValue]
|
||||
// #[ORM\Column(type: 'integer')]
|
||||
// private $id;
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $offer_id;
|
||||
|
||||
// public function getId(): ?int
|
||||
// {
|
||||
// return $this->id;
|
||||
// }
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getOfferId(): ?int
|
||||
{
|
||||
|
@ -5,21 +5,21 @@ namespace App\Entity;
|
||||
use App\Repository\MerDTRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
//#[ORM\Entity(repositoryClass: MerDTRepository::class)]
|
||||
trait MerDT
|
||||
#[ORM\Entity(repositoryClass: MerDTRepository::class)]
|
||||
class MerDT
|
||||
{
|
||||
// #[ORM\Id]
|
||||
// #[ORM\GeneratedValue]
|
||||
// #[ORM\Column(type: 'integer')]
|
||||
// private $id;
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $service_id;
|
||||
|
||||
// public function getId(): ?int
|
||||
// {
|
||||
// return $this->id;
|
||||
// }
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getServiceId(): ?string
|
||||
{
|
||||
|
@ -8,8 +8,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\Entity(repositoryClass: MerParaDMRepository::class)]
|
||||
class MerParaDM extends MerService
|
||||
{
|
||||
use MerDM;
|
||||
|
||||
// #[ORM\Id]
|
||||
// #[ORM\GeneratedValue]
|
||||
// #[ORM\Column(type: 'integer')]
|
||||
@ -18,6 +16,10 @@ class MerParaDM extends MerService
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $product_code;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: MerDM::class, cascade: ['persist'])]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private MerDM $platform;
|
||||
|
||||
// public function getId(): ?int
|
||||
// {
|
||||
// return $this->id;
|
||||
@ -34,4 +36,16 @@ class MerParaDM extends MerService
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPlatform(): ?MerDM
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
public function setPlatform(?MerDM $platform): self
|
||||
{
|
||||
$this->platform = $platform;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\Entity(repositoryClass: MerParaDTRepository::class)]
|
||||
class MerParaDT extends MerService
|
||||
{
|
||||
use MerDT;
|
||||
|
||||
// #[ORM\Id]
|
||||
// #[ORM\GeneratedValue]
|
||||
// #[ORM\Column(type: 'integer')]
|
||||
@ -18,6 +16,10 @@ 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;
|
||||
@ -34,4 +36,16 @@ class MerParaDT extends MerService
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPlatform(): ?MerDT
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
public function setPlatform(?MerDT $platform): self
|
||||
{
|
||||
$this->platform = $platform;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user