src/Mm/Beton/Planungsatlas/AtlasBundle/Entity/Main/Construction.php line 15

Open in your IDE?
  1. <?php
  2. namespace Mm\Beton\Planungsatlas\AtlasBundle\Entity\Main;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Class Construction
  7.  *
  8.  * @package Mm\Beton\Planungsatlas\AtlasBundle\Entity
  9.  * @ORM\Entity
  10.  * @ORM\Table(name="constructions")
  11.  */
  12. class Construction extends AbstractModel
  13. {
  14.     /**
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=128, nullable=false)
  22.      */
  23.     private $name;
  24.     /**
  25.      * @var ArrayCollection
  26.      * @ORM\OneToMany(targetEntity="ConstructionType", mappedBy="construction")
  27.      */
  28.     private $constructionTypes;
  29.     /**
  30.      * Constructor
  31.      */
  32.     public function __construct()
  33.     {
  34.         $this->constructionTypes = new ArrayCollection();
  35.     }
  36.     /**
  37.      * @return mixed
  38.      */
  39.     public function getId()
  40.     {
  41.         return $this->id;
  42.     }
  43.     /**
  44.      * @param mixed $id
  45.      */
  46.     public function setId($id)
  47.     {
  48.         $this->id $id;
  49.     }
  50.     /**
  51.      * @return mixed
  52.      */
  53.     public function getName()
  54.     {
  55.         return $this->name;
  56.     }
  57.     /**
  58.      * @param mixed $name
  59.      */
  60.     public function setName($name)
  61.     {
  62.         $this->name $name;
  63.     }
  64.     /**
  65.      * @return ConstructionType[]
  66.      */
  67.     public function getConstructionTypes()
  68.     {
  69.         return $this->constructionTypes;
  70.     }
  71.     /**
  72.      * @param ConstructionType[] $constructionTypes
  73.      */
  74.     public function setConstructionTypes($constructionTypes)
  75.     {
  76.         $this->constructionTypes $constructionTypes;
  77.     }
  78. }