Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace dn\AnkieterBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * dn\AnkieterBundle\Entity\Question
- *
- * @ORM\Table()
- * @ORM\Entity
- */
- class Question
- {
- /**
- * @var integer $id
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @var integer $position
- *
- * @ORM\Column(name="position", type="integer")
- */
- private $position;
- /**
- * @var string $content
- *
- * @ORM\Column(name="content", type="string", length=255)
- */
- private $content;
- /**
- * @ORM\ManyToOne(targetEntity="Inquiry", inversedBy="questions")
- * @ORM\JoinColumn(name="inquiry_id", referencedColumnName="id")
- */
- protected $inquiry;
- /**
- * @ORM\OneToMany(targetEntity="Answer", mappedBy="question")
- */
- protected $answers;
- public function __construct()
- {
- $this->answers = new ArrayCollection();
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set position
- *
- * @param integer $position
- */
- public function setPosition($position)
- {
- $this->position = $position;
- }
- /**
- * Get position
- *
- * @return integer
- */
- public function getPosition()
- {
- return $this->position;
- }
- /**
- * Set content
- *
- * @param string $content
- */
- public function setContent($content)
- {
- $this->content = $content;
- }
- /**
- * Get content
- *
- * @return string
- */
- public function getContent()
- {
- return $this->content;
- }
- /**
- * Set inquiry
- *
- * @param dn\AnkieterBundle\Entity\Inquiry $inquiry
- */
- public function setInquiry(\dn\AnkieterBundle\Entity\Inquiry $inquiry)
- {
- $this->inquiry = $inquiry;
- }
- /**
- * Get inquiry
- *
- * @return dn\AnkieterBundle\Entity\Inquiry
- */
- public function getInquiry()
- {
- return $this->inquiry;
- }
- /**
- * Add answers
- *
- * @param dn\AnkieterBundle\Entity\Answer $answers
- */
- public function addAnswer(\dn\AnkieterBundle\Entity\Answer $answers)
- {
- $this->answers[] = $answers;
- }
- /**
- * Get answers
- *
- * @return Doctrine\Common\Collections\Collection
- */
- public function getAnswers()
- {
- return $this->answers;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement