src/Aviatur/CruiserBundle/Entity/Region.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\CruiserBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Region.
  6.  *
  7.  * @ORM\Table(name="region")
  8.  * @ORM\Entity
  9.  */
  10. class Region
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="regionCode", type="integer", length=11, nullable=false)
  24.      */
  25.     private $regioncode;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  30.      */
  31.     private $name;
  32.     /**
  33.      * @var \Aviatur\CruiserBundle\Entity\CruiseRegionPorts
  34.      *
  35.      * @ORM\OneToMany(targetEntity="\Aviatur\CruiserBundle\Entity\CruiseRegionPorts", mappedBy="region")
  36.      */
  37.     private $cruiseRegionPorts;
  38.     /**
  39.      * Constructor.
  40.      */
  41.     public function __construct()
  42.     {
  43.         $this->cruiseRegionPorts = new \Doctrine\Common\Collections\ArrayCollection();
  44.     }
  45.     /**
  46.      * Get id.
  47.      *
  48.      * @return int
  49.      */
  50.     public function getId()
  51.     {
  52.         return $this->id;
  53.     }
  54.     /**
  55.      * Set regioncode.
  56.      *
  57.      * @param string $regioncode
  58.      *
  59.      * @return Region
  60.      */
  61.     public function setregionCode($regioncode)
  62.     {
  63.         $this->regioncode $regioncode;
  64.         return $this;
  65.     }
  66.     /**
  67.      * Get regioncode.
  68.      *
  69.      * @return string
  70.      */
  71.     public function getregionCode()
  72.     {
  73.         return $this->regioncode;
  74.     }
  75.     /**
  76.      * Set name.
  77.      *
  78.      * @param string $name
  79.      *
  80.      * @return Region
  81.      */
  82.     public function setName($name)
  83.     {
  84.         $this->name $name;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get name.
  89.      *
  90.      * @return string
  91.      */
  92.     public function getName()
  93.     {
  94.         return $this->name;
  95.     }
  96.     /**
  97.      * Add cruiseRegionPorts.
  98.      *
  99.      * @return Region
  100.      */
  101.     public function addCruiseRegionPorts(\Aviatur\CruiserBundle\Entity\CruiseRegionPorts $cruiseRegionPorts)
  102.     {
  103.         $this->cruiseRegionPorts[] = $cruiseRegionPorts;
  104.         return $this;
  105.     }
  106.     /**
  107.      * Remove cruiseRegionPorts.
  108.      */
  109.     public function removeCruiseRegionPorts(\Aviatur\CruiserBundle\Entity\CruiseRegionPorts $cruiseRegionPorts)
  110.     {
  111.         $this->cruiseRegionPorts->removeElement($cruiseRegionPorts);
  112.     }
  113.     /**
  114.      * Get cruiseRegionPorts.
  115.      *
  116.      * @return \Doctrine\Common\Collections\Collection
  117.      */
  118.     public function getCruiseRegionPorts()
  119.     {
  120.         return $this->cruiseRegionPorts;
  121.     }
  122. }