QuestionScore.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="question_score")
  6. * @ORM\Entity(repositoryClass="Entity\Repository\QuestionScoreRepository")
  7. */
  8. class QuestionScore
  9. {
  10. /**
  11. * @ORM\Column(name="id", type="integer")
  12. * @ORM\Id()
  13. * @ORM\GeneratedValue(strategy="AUTO")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(name="name", type="string", length=255)
  18. */
  19. private $name;
  20. /**
  21. * cascade options remove: Cascades remove operations to the associated entities.
  22. * detach: Cascades detach operations to the associated entities.
  23. * @ORM\OneToMany(targetEntity="QuestionScoreName", mappedBy="questionScore", cascade={"persist", "remove"} )
  24. */
  25. private $items;
  26. public function __construct()
  27. {
  28. }
  29. public function getItems()
  30. {
  31. return $this->items;
  32. }
  33. /**
  34. * Get id
  35. *
  36. * @return integer
  37. */
  38. public function getId()
  39. {
  40. return $this->id;
  41. }
  42. /**
  43. * Set name
  44. *
  45. * @param string $name
  46. * @return QuestionScore
  47. */
  48. public function setName($name)
  49. {
  50. $this->name = $name;
  51. return $this;
  52. }
  53. /**
  54. * Get name
  55. *
  56. * @return string
  57. */
  58. public function getName()
  59. {
  60. return $this->name;
  61. }
  62. }