src/Entity/AuxCity.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AuxCityRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=AuxCityRepository::class)
  7.  */
  8. class AuxCity
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=50)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=AuxCountry::class, inversedBy="auxCities")
  22.      * @ORM\JoinColumn(onDelete="CASCADE")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $aux_country;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getName(): ?string
  31.     {
  32.         return $this->name;
  33.     }
  34.     public function setName(string $name): self
  35.     {
  36.         $this->name $name;
  37.         return $this;
  38.     }
  39.     public function getAuxCountry(): ?AuxCountry
  40.     {
  41.         return $this->aux_country;
  42.     }
  43.     public function setAuxCountry(?AuxCountry $aux_country): self
  44.     {
  45.         $this->aux_country $aux_country;
  46.         return $this;
  47.     }
  48. }