src/Entity/Master/CityAlias.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Master;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="eposm_m_city_alias")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Master\CityAliasRepository")
  10.  */
  11. class CityAlias
  12. {        
  13.     public function canDelete(){
  14.         return true;
  15.     }
  16.     /**
  17.      * @ORM\Column(name="id", type="bigint")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     
  23.     /**
  24.      * @ORM\Column(name="value", type="string", length=191)
  25.      */
  26.     protected $value;
  27.     
  28.     // ManyToOne
  29.         /**
  30.          * @ORM\ManyToOne(targetEntity="App\Entity\Master\City", inversedBy="aliases")
  31.          * @ORM\JoinColumn(name="city_id", referencedColumnName="id")
  32.          */
  33.         private $city;
  34.     //
  35.     public function getId(): ?string
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getValue(): ?string
  40.     {
  41.         return $this->value;
  42.     }
  43.     public function setValue(string $value): self
  44.     {
  45.         $this->value $value;
  46.         return $this;
  47.     }
  48.     public function getCity(): ?City
  49.     {
  50.         return $this->city;
  51.     }
  52.     public function setCity(?City $city): self
  53.     {
  54.         $this->city $city;
  55.         return $this;
  56.     }
  57. }