You've already forked symfony-playground
simulation model
This commit is contained in:
57
src/Entity/MerService.php
Normal file
57
src/Entity/MerService.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\MerServiceRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\InheritanceType('SINGLE_TABLE')]
|
||||
#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
|
||||
#[ORM\DiscriminatorMap([
|
||||
'para_dm' => MerParaDM::class,
|
||||
'para_dt' => MerParaDT::class,
|
||||
'be_dm' => MerBeDM::class
|
||||
])]
|
||||
#[ORM\Entity(repositoryClass: MerServiceRepository::class)]
|
||||
abstract class MerService
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private $mcc_mnc;
|
||||
|
||||
#[ORM\Column(type: 'json', nullable: true)]
|
||||
private $metadata = [];
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getMccMnc(): ?int
|
||||
{
|
||||
return $this->mcc_mnc;
|
||||
}
|
||||
|
||||
public function setMccMnc(?int $mcc_mnc): self
|
||||
{
|
||||
$this->mcc_mnc = $mcc_mnc;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetadata(): ?array
|
||||
{
|
||||
return $this->metadata;
|
||||
}
|
||||
|
||||
public function setMetadata(?array $metadata): self
|
||||
{
|
||||
$this->metadata = $metadata;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user