CQuizQuestion.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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. public function getCategories()
  102. {
  103. return $this->quizQuestionRelCategoryList;
  104. }
  105. /**
  106. * Set cId
  107. *
  108. * @param integer $cId
  109. * @return CQuizQuestion
  110. */
  111. public function setCId($cId)
  112. {
  113. $this->cId = $cId;
  114. return $this;
  115. }
  116. /**
  117. * Get cId
  118. *
  119. * @return integer
  120. */
  121. public function getCId()
  122. {
  123. return $this->cId;
  124. }
  125. /**
  126. * Set id
  127. *
  128. * @param integer $id
  129. * @return CQuizQuestionCategory
  130. */
  131. public function setIid($id)
  132. {
  133. $this->iid = $id;
  134. return $this;
  135. }
  136. /**
  137. * Get id
  138. *
  139. * @return integer
  140. */
  141. public function getIid()
  142. {
  143. return $this->iid;
  144. }
  145. /**
  146. * Set question
  147. *
  148. * @param string $question
  149. * @return CQuizQuestion
  150. */
  151. public function setQuestion($question)
  152. {
  153. $this->question = $question;
  154. return $this;
  155. }
  156. /**
  157. * Get question
  158. *
  159. * @return string
  160. */
  161. public function getQuestion()
  162. {
  163. return $this->question;
  164. }
  165. /**
  166. * Set description
  167. *
  168. * @param string $description
  169. * @return CQuizQuestion
  170. */
  171. public function setDescription($description)
  172. {
  173. $this->description = $description;
  174. return $this;
  175. }
  176. /**
  177. * Get description
  178. *
  179. * @return string
  180. */
  181. public function getDescription()
  182. {
  183. return $this->description;
  184. }
  185. /**
  186. * Set ponderation
  187. *
  188. * @param float $ponderation
  189. * @return CQuizQuestion
  190. */
  191. public function setPonderation($ponderation)
  192. {
  193. $this->ponderation = $ponderation;
  194. return $this;
  195. }
  196. /**
  197. * Get ponderation
  198. *
  199. * @return float
  200. */
  201. public function getPonderation()
  202. {
  203. return $this->ponderation;
  204. }
  205. /**
  206. * Set position
  207. *
  208. * @param integer $position
  209. * @return CQuizQuestion
  210. */
  211. public function setPosition($position)
  212. {
  213. $this->position = $position;
  214. return $this;
  215. }
  216. /**
  217. * Get position
  218. *
  219. * @return integer
  220. */
  221. public function getPosition()
  222. {
  223. return $this->position;
  224. }
  225. /**
  226. * Set type
  227. *
  228. * @param boolean $type
  229. * @return CQuizQuestion
  230. */
  231. public function setType($type)
  232. {
  233. $this->type = $type;
  234. return $this;
  235. }
  236. /**
  237. * Get type
  238. *
  239. * @return boolean
  240. */
  241. public function getType()
  242. {
  243. return $this->type;
  244. }
  245. /**
  246. * Set picture
  247. *
  248. * @param string $picture
  249. * @return CQuizQuestion
  250. */
  251. public function setPicture($picture)
  252. {
  253. $this->picture = $picture;
  254. return $this;
  255. }
  256. /**
  257. * Get picture
  258. *
  259. * @return string
  260. */
  261. public function getPicture()
  262. {
  263. return $this->picture;
  264. }
  265. /**
  266. * Set level
  267. *
  268. * @param integer $level
  269. * @return CQuizQuestion
  270. */
  271. public function setLevel($level)
  272. {
  273. $this->level = $level;
  274. return $this;
  275. }
  276. /**
  277. * Get level
  278. *
  279. * @return integer
  280. */
  281. public function getLevel()
  282. {
  283. return $this->level;
  284. }
  285. /**
  286. * Set extra
  287. *
  288. * @param string $extra
  289. * @return CQuizQuestion
  290. */
  291. public function setExtra($extra)
  292. {
  293. $this->extra = $extra;
  294. return $this;
  295. }
  296. /**
  297. * Get extra
  298. *
  299. * @return string
  300. */
  301. public function getExtra()
  302. {
  303. return $this->extra;
  304. }
  305. /**
  306. * Set questionCode
  307. *
  308. * @param string $questionCode
  309. * @return CQuizQuestion
  310. */
  311. public function setQuestionCode($questionCode)
  312. {
  313. $this->questionCode = $questionCode;
  314. return $this;
  315. }
  316. /**
  317. * Get questionCode
  318. *
  319. * @return string
  320. */
  321. public function getQuestionCode()
  322. {
  323. return $this->questionCode;
  324. }
  325. /**
  326. * Set parentId
  327. *
  328. * @param integer $parentId
  329. * @return CQuizQuestion
  330. */
  331. public function setParentId($parentId)
  332. {
  333. $this->parentId = $parentId;
  334. return $this;
  335. }
  336. /**
  337. * Get parentId
  338. *
  339. * @return integer
  340. */
  341. public function getParentId()
  342. {
  343. return $this->parentId;
  344. }
  345. }