CurriculumItem.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6. * CurriculumItem
  7. *
  8. * @ORM\Table(name="curriculum_item")
  9. * @ORM\Entity
  10. */
  11. class CurriculumItem
  12. {
  13. /**
  14. * @var integer
  15. *
  16. * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="IDENTITY")
  19. */
  20. private $id;
  21. /**
  22. * @var integer
  23. *
  24. * @ORM\Column(name="category_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  25. */
  26. private $categoryId;
  27. /**
  28. * @var string
  29. *
  30. * @ORM\Column(name="title", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
  31. */
  32. private $title;
  33. /**
  34. * @var integer
  35. *
  36. * @ORM\Column(name="score", type="integer", precision=0, scale=0, nullable=false, unique=false)
  37. */
  38. private $score;
  39. /**
  40. * @var boolean
  41. *
  42. * @ORM\Column(name="max_repeat", type="integer", precision=0, scale=0, nullable=false, unique=false)
  43. */
  44. private $maxRepeat;
  45. /**
  46. * @ORM\ManyToOne(targetEntity="CurriculumCategory")
  47. * @ORM\JoinColumn(name="category_id", referencedColumnName="id", nullable=true)
  48. */
  49. private $category;
  50. /**
  51. * @ORM\OneToMany(targetEntity="CurriculumItemRelUser", mappedBy="item")
  52. * @ORM\OrderBy({"orderId" = "ASC"})
  53. */
  54. private $userItems;
  55. /**
  56. *
  57. */
  58. public function __construct()
  59. {
  60. $this->userItems = new ArrayCollection();
  61. }
  62. /**
  63. *
  64. * @return CurriculumCategory
  65. */
  66. public function getCategory()
  67. {
  68. return $this->category;
  69. }
  70. /**
  71. *
  72. * @return ArrayCollection
  73. */
  74. public function getUserItems()
  75. {
  76. return $this->userItems;
  77. }
  78. /**
  79. * @param $userItem
  80. */
  81. public function setUserItems($userItem)
  82. {
  83. $this->userItems = $userItem;
  84. }
  85. /**
  86. * @param CurriculumCategory $category
  87. */
  88. public function setCategory(CurriculumCategory $category)
  89. {
  90. $this->category = $category;
  91. }
  92. /**
  93. * Get id
  94. *
  95. * @return integer
  96. */
  97. public function getId()
  98. {
  99. return $this->id;
  100. }
  101. /**
  102. * Set categoryId
  103. *
  104. * @param integer $categoryId
  105. * @return CurriculumItem
  106. */
  107. public function setCategoryId($categoryId)
  108. {
  109. $this->categoryId = $categoryId;
  110. return $this;
  111. }
  112. /**
  113. * Get categoryId
  114. *
  115. * @return integer
  116. */
  117. public function getCategoryId()
  118. {
  119. return $this->categoryId;
  120. }
  121. /**
  122. * Set title
  123. *
  124. * @param string $title
  125. * @return CurriculumItem
  126. */
  127. public function setTitle($title)
  128. {
  129. $this->title = $title;
  130. return $this;
  131. }
  132. /**
  133. * Get title
  134. *
  135. * @return string
  136. */
  137. public function getTitle()
  138. {
  139. return $this->title;
  140. }
  141. /**
  142. * Set score
  143. *
  144. * @param integer $score
  145. * @return CurriculumItem
  146. */
  147. public function setScore($score)
  148. {
  149. $this->score = $score;
  150. return $this;
  151. }
  152. /**
  153. * Get score
  154. *
  155. * @return integer
  156. */
  157. public function getScore()
  158. {
  159. return $this->score;
  160. }
  161. /**
  162. * Set maxRepeat
  163. *
  164. * @param boolean $maxRepeat
  165. * @return CurriculumItem
  166. */
  167. public function setMaxRepeat($maxRepeat)
  168. {
  169. $this->maxRepeat = $maxRepeat;
  170. return $this;
  171. }
  172. /**
  173. * Get maxRepeat
  174. *
  175. * @return boolean
  176. */
  177. public function getMaxRepeat()
  178. {
  179. return $this->maxRepeat;
  180. }
  181. }