Advertisement
Guest User

Inquiry

a guest
Nov 19th, 2011
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.16 KB | None | 0 0
  1. <?php
  2.  
  3. namespace dn\AnkieterBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7.  
  8. /**
  9.  * dn\AnkieterBundle\Entity\Inquiry
  10.  *
  11.  * @ORM\Table()
  12.  * @ORM\Entity(repositoryClass="dn\AnkieterBundle\Entity\InquiryRepository")
  13.  */
  14. class Inquiry
  15. {
  16.     /**
  17.      * @var integer $id
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.  
  25.     /**
  26.      * @var string $name
  27.      *
  28.      * @ORM\Column(name="name", type="string", length=255)
  29.      */
  30.     private $name;
  31.  
  32.     /**
  33.      * @var string $description
  34.      *
  35.      * @ORM\Column(name="description", type="string", length=255)
  36.      */
  37.     private $description;
  38.  
  39.  
  40.     /**
  41.      * @ORM\OneToMany(targetEntity="Question", mappedBy="inquiry")
  42.      */
  43.     protected $questions;
  44.  
  45.  
  46.     public function __construct()
  47.     {
  48.         $this->questions = new ArrayCollection();
  49.     }
  50.  
  51.  
  52.     /**
  53.      * Get id
  54.      *
  55.      * @return integer
  56.      */
  57.     public function getId()
  58.     {
  59.         return $this->id;
  60.     }
  61.  
  62.     /**
  63.      * Set name
  64.      *
  65.      * @param string $name
  66.      */
  67.     public function setName($name)
  68.     {
  69.         $this->name = $name;
  70.     }
  71.  
  72.     /**
  73.      * Get name
  74.      *
  75.      * @return string
  76.      */
  77.     public function getName()
  78.     {
  79.         return $this->name;
  80.     }
  81.  
  82.     /**
  83.      * Set description
  84.      *
  85.      * @param string $description
  86.      */
  87.     public function setDescription($description)
  88.     {
  89.         $this->description = $description;
  90.     }
  91.  
  92.     /**
  93.      * Get description
  94.      *
  95.      * @return string
  96.      */
  97.     public function getDescription()
  98.     {
  99.         return $this->description;
  100.     }
  101.  
  102.     /**
  103.      * Add questions
  104.      *
  105.      * @param dn\AnkieterBundle\Entity\Question $questions
  106.      */
  107.     public function addQuestion(\dn\AnkieterBundle\Entity\Question $questions)
  108.     {
  109.         $this->questions[] = $questions;
  110.     }
  111.  
  112.     /**
  113.      * Get questions
  114.      *
  115.      * @return Doctrine\Common\Collections\Collection
  116.      */
  117.     public function getQuestions()
  118.     {
  119.         return $this->questions;
  120.     }
  121. }
  122.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement