CQuizDistribution.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6. * CQuizDistribution
  7. *
  8. * @ORM\Table(name="c_quiz_distribution")
  9. * @ORM\Entity(repositoryClass="Entity\Repository\CQuizDistributionRepository")
  10. */
  11. class CQuizDistribution
  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 string
  23. *
  24. * @ORM\Column(name="title", type="string", length=250, precision=0, scale=0, nullable=true, unique=false)
  25. */
  26. private $title;
  27. /**
  28. * @var integer
  29. *
  30. * @ORM\Column(name="exercise_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  31. */
  32. private $exerciseId;
  33. /**
  34. * @var string
  35. *
  36. * @ORM\Column(name="data_tracking", type="text", precision=0, scale=0, nullable=false, unique=false)
  37. */
  38. private $dataTracking;
  39. /**
  40. * @var boolean
  41. *
  42. * @ORM\Column(name="active", type="boolean", precision=0, scale=0, nullable=false, unique=false)
  43. */
  44. private $active;
  45. /**
  46. * @var integer
  47. *
  48. * @ORM\Column(name="author_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  49. */
  50. private $authorUserId;
  51. /**
  52. * @var \DateTime
  53. *
  54. * @ORM\Column(name="last_generation_date", type="datetime", precision=0, scale=0, nullable=true, unique=false)
  55. */
  56. private $lastGenerationDate;
  57. /**
  58. * @ORM\OneToMany(targetEntity="CQuizDistributionQuestions", mappedBy="distribution", cascade={"persist", "remove"} )
  59. */
  60. private $questions;
  61. public function __construct()
  62. {
  63. $this->lastGenerationDate = new \DateTime();
  64. $this->questions = new ArrayCollection();
  65. }
  66. public function getQuestions()
  67. {
  68. return $this->questions;
  69. }
  70. public function setQuestions($questions)
  71. {
  72. $this->questions = $questions;
  73. return $this;
  74. }
  75. public function setQuestion(CQuizDistributionQuestions $questions)
  76. {
  77. $this->questions->add($questions);
  78. }
  79. /**
  80. * Get id
  81. *
  82. * @return integer
  83. */
  84. public function getId()
  85. {
  86. return $this->id;
  87. }
  88. /**
  89. * Set exerciseId
  90. *
  91. * @param integer $exerciseId
  92. * @return CQuizDistribution
  93. */
  94. public function setExerciseId($exerciseId)
  95. {
  96. $this->exerciseId = $exerciseId;
  97. return $this;
  98. }
  99. /**
  100. * Set title
  101. *
  102. * @param string $title
  103. * @return CQuizDistribution
  104. */
  105. public function setTitle($title)
  106. {
  107. $this->title = $title;
  108. return $this;
  109. }
  110. /**
  111. * Get title
  112. *
  113. * @return string
  114. */
  115. public function getTitle()
  116. {
  117. return $this->title;
  118. }
  119. /**
  120. * Get exerciseId
  121. *
  122. * @return integer
  123. */
  124. public function getExerciseId()
  125. {
  126. return $this->exerciseId;
  127. }
  128. /**
  129. * Set dataTracking
  130. *
  131. * @param string $dataTracking
  132. * @return CQuizDistribution
  133. */
  134. public function setDataTracking($dataTracking)
  135. {
  136. $this->dataTracking = $dataTracking;
  137. return $this;
  138. }
  139. /**
  140. * Get dataTracking
  141. *
  142. * @return string
  143. */
  144. public function getDataTracking()
  145. {
  146. return $this->dataTracking;
  147. }
  148. /**
  149. * Set active
  150. *
  151. * @param boolean $active
  152. * @return CQuizDistribution
  153. */
  154. public function setActive($active)
  155. {
  156. $this->active = $active;
  157. return $this;
  158. }
  159. /**
  160. * Get active
  161. *
  162. * @return boolean
  163. */
  164. public function getActive()
  165. {
  166. return $this->active;
  167. }
  168. /**
  169. * Set authorUserId
  170. *
  171. * @param integer $authorUserId
  172. * @return CQuizDistribution
  173. */
  174. public function setAuthorUserId($authorUserId)
  175. {
  176. $this->authorUserId = $authorUserId;
  177. return $this;
  178. }
  179. /**
  180. * Get authorUserId
  181. *
  182. * @return integer
  183. */
  184. public function getAuthorUserId()
  185. {
  186. return $this->authorUserId;
  187. }
  188. /**
  189. * Set lastGenerationDate
  190. *
  191. * @param \DateTime $lastGenerationDate
  192. * @return CQuizDistribution
  193. */
  194. public function setLastGenerationDate($lastGenerationDate)
  195. {
  196. $this->lastGenerationDate = $lastGenerationDate;
  197. return $this;
  198. }
  199. /**
  200. * Get lastGenerationDate
  201. *
  202. * @return \DateTime
  203. */
  204. public function getLastGenerationDate()
  205. {
  206. return $this->lastGenerationDate;
  207. }
  208. }