CQuizQuestion.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. /**
  7. * CQuizQuestion
  8. *
  9. * @ORM\Table(name="c_quiz_question")
  10. * @ORM\Entity(repositoryClass="Entity\Repository\CQuizQuestionRepository")
  11. */
  12. class CQuizQuestion
  13. {
  14. /**
  15. * @var integer
  16. *
  17. * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false)
  18. * @ORM\Id
  19. * @ORM\GeneratedValue(strategy="IDENTITY")
  20. */
  21. private $iid;
  22. /**
  23. * @var integer
  24. *
  25. * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  26. */
  27. private $cId;
  28. /**
  29. * @var string
  30. *
  31. * @ORM\Column(name="question", type="text", precision=0, scale=0, nullable=false, unique=false)
  32. */
  33. private $question;
  34. /**
  35. * @var string
  36. *
  37. * @ORM\Column(name="description", type="text", precision=0, scale=0, nullable=true, unique=false)
  38. */
  39. private $description;
  40. /**
  41. * @var float
  42. *
  43. * @ORM\Column(name="ponderation", type="float", precision=0, scale=0, nullable=false, unique=false)
  44. */
  45. private $ponderation;
  46. /**
  47. * @var integer
  48. *
  49. * @ORM\Column(name="position", type="integer", precision=0, scale=0, nullable=false, unique=false)
  50. */
  51. private $position;
  52. /**
  53. * @var boolean
  54. *
  55. * @ORM\Column(name="type", type="boolean", precision=0, scale=0, nullable=false, unique=false)
  56. */
  57. private $type;
  58. /**
  59. * @var string
  60. *
  61. * @ORM\Column(name="picture", type="string", length=50, precision=0, scale=0, nullable=true, unique=false)
  62. */
  63. private $picture;
  64. /**
  65. * @var integer
  66. *
  67. * @ORM\Column(name="level", type="integer", precision=0, scale=0, nullable=false, unique=false)
  68. */
  69. private $level;
  70. /**
  71. * @var string
  72. *
  73. * @ORM\Column(name="extra", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
  74. */
  75. private $extra;
  76. /**
  77. * @var string
  78. *
  79. * @ORM\Column(name="question_code", type="string", length=10, precision=0, scale=0, nullable=true, unique=false)
  80. */
  81. private $questionCode;
  82. /**
  83. * @var integer
  84. *
  85. * @ORM\Column(name="parent_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  86. */
  87. private $parentId;
  88. /**
  89. * @ORM\OneToMany(targetEntity="CQuizQuestionRelCategory", mappedBy="question")
  90. **/
  91. private $quizQuestionRelCategoryList;
  92. /**
  93. * @ORM\OneToMany(targetEntity="QuestionFieldValues", mappedBy="question")
  94. */
  95. private $extraFields;
  96. public function __construct()
  97. {
  98. $this->quizQuestionRelCategoryList = new ArrayCollection();
  99. $this->extraFields = new ArrayCollection();
  100. }
  101. /**
  102. * @return ArrayCollection
  103. */
  104. public function getCategories()
  105. {
  106. return $this->quizQuestionRelCategoryList;
  107. }
  108. /**
  109. * Set cId
  110. *
  111. * @param integer $cId
  112. * @return CQuizQuestion
  113. */
  114. public function setCId($cId)
  115. {
  116. $this->cId = $cId;
  117. return $this;
  118. }
  119. /**
  120. * Get cId
  121. *
  122. * @return integer
  123. */
  124. public function getCId()
  125. {
  126. return $this->cId;
  127. }
  128. /**
  129. * Set id
  130. *
  131. * @param integer $id
  132. * @return CQuizQuestionCategory
  133. */
  134. public function setIid($id)
  135. {
  136. $this->iid = $id;
  137. return $this;
  138. }
  139. /**
  140. * Get id
  141. *
  142. * @return integer
  143. */
  144. public function getIid()
  145. {
  146. return $this->iid;
  147. }
  148. /**
  149. * Set question
  150. *
  151. * @param string $question
  152. * @return CQuizQuestion
  153. */
  154. public function setQuestion($question)
  155. {
  156. $this->question = $question;
  157. return $this;
  158. }
  159. /**
  160. * Get question
  161. *
  162. * @return string
  163. */
  164. public function getQuestion()
  165. {
  166. return $this->question;
  167. }
  168. /**
  169. * Set description
  170. *
  171. * @param string $description
  172. * @return CQuizQuestion
  173. */
  174. public function setDescription($description)
  175. {
  176. $this->description = $description;
  177. return $this;
  178. }
  179. /**
  180. * Get description
  181. *
  182. * @return string
  183. */
  184. public function getDescription()
  185. {
  186. return $this->description;
  187. }
  188. /**
  189. * Set ponderation
  190. *
  191. * @param float $ponderation
  192. * @return CQuizQuestion
  193. */
  194. public function setPonderation($ponderation)
  195. {
  196. $this->ponderation = $ponderation;
  197. return $this;
  198. }
  199. /**
  200. * Get ponderation
  201. *
  202. * @return float
  203. */
  204. public function getPonderation()
  205. {
  206. return $this->ponderation;
  207. }
  208. /**
  209. * Set position
  210. *
  211. * @param integer $position
  212. * @return CQuizQuestion
  213. */
  214. public function setPosition($position)
  215. {
  216. $this->position = $position;
  217. return $this;
  218. }
  219. /**
  220. * Get position
  221. *
  222. * @return integer
  223. */
  224. public function getPosition()
  225. {
  226. return $this->position;
  227. }
  228. /**
  229. * Set type
  230. *
  231. * @param boolean $type
  232. * @return CQuizQuestion
  233. */
  234. public function setType($type)
  235. {
  236. $this->type = $type;
  237. return $this;
  238. }
  239. /**
  240. * Get type
  241. *
  242. * @return boolean
  243. */
  244. public function getType()
  245. {
  246. return $this->type;
  247. }
  248. /**
  249. * Set picture
  250. *
  251. * @param string $picture
  252. * @return CQuizQuestion
  253. */
  254. public function setPicture($picture)
  255. {
  256. $this->picture = $picture;
  257. return $this;
  258. }
  259. /**
  260. * Get picture
  261. *
  262. * @return string
  263. */
  264. public function getPicture()
  265. {
  266. return $this->picture;
  267. }
  268. /**
  269. * Set level
  270. *
  271. * @param integer $level
  272. * @return CQuizQuestion
  273. */
  274. public function setLevel($level)
  275. {
  276. $this->level = $level;
  277. return $this;
  278. }
  279. /**
  280. * Get level
  281. *
  282. * @return integer
  283. */
  284. public function getLevel()
  285. {
  286. return $this->level;
  287. }
  288. /**
  289. * Set extra
  290. *
  291. * @param string $extra
  292. * @return CQuizQuestion
  293. */
  294. public function setExtra($extra)
  295. {
  296. $this->extra = $extra;
  297. return $this;
  298. }
  299. /**
  300. * Get extra
  301. *
  302. * @return string
  303. */
  304. public function getExtra()
  305. {
  306. return $this->extra;
  307. }
  308. /**
  309. * Set questionCode
  310. *
  311. * @param string $questionCode
  312. * @return CQuizQuestion
  313. */
  314. public function setQuestionCode($questionCode)
  315. {
  316. $this->questionCode = $questionCode;
  317. return $this;
  318. }
  319. /**
  320. * Get questionCode
  321. *
  322. * @return string
  323. */
  324. public function getQuestionCode()
  325. {
  326. return $this->questionCode;
  327. }
  328. /**
  329. * Set parentId
  330. *
  331. * @param integer $parentId
  332. * @return CQuizQuestion
  333. */
  334. public function setParentId($parentId)
  335. {
  336. $this->parentId = $parentId;
  337. return $this;
  338. }
  339. /**
  340. * Get parentId
  341. *
  342. * @return integer
  343. */
  344. public function getParentId()
  345. {
  346. return $this->parentId;
  347. }
  348. }