src/CoreBundle/Entity/BugReport.php line 11

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table("bug_report")
  6. * @ORM\Entity(repositoryClass="CoreBundle\Entity\BugReportRepository")
  7. */
  8. class BugReport
  9. {
  10. /**
  11. * @var int
  12. *
  13. * @ORM\Column(name="id", type="integer")
  14. * @ORM\Id
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. */
  17. private $id;
  18. /**
  19. * @var int
  20. *
  21. * @ORM\Column(name="session_id", type="integer", nullable=true)
  22. */
  23. private $sessionId;
  24. /**
  25. * @var int
  26. *
  27. * @ORM\ManyToOne(targetEntity="Mathproblem", inversedBy="bugReports")
  28. * @ORM\JoinColumn(name="mp_id", referencedColumnName="id")
  29. */
  30. private Mathproblem $problem;
  31. /**
  32. * @var bool
  33. *
  34. * @ORM\Column(name="mp_error", type="boolean", options={"default":0})
  35. */
  36. private $mpError;
  37. /**
  38. * @var bool
  39. *
  40. * @ORM\Column(name="mp_curriculum", type="boolean", options={"default":0})
  41. */
  42. private $mpCurriculum;
  43. /**
  44. * @var bool
  45. *
  46. * @ORM\Column(name="mp_understanding", type="boolean", options={"default":0})
  47. */
  48. private $mpUnderstanding;
  49. /**
  50. * @var bool
  51. *
  52. * @ORM\Column(name="mp_technical", type="boolean", options={"default":0})
  53. */
  54. private $mpTechnical;
  55. /**
  56. * @var string
  57. *
  58. * @ORM\Column(name="message", type="string", nullable=true, length=2000)
  59. */
  60. private $message;
  61. /**
  62. * @var string
  63. *
  64. * @ORM\Column(name="mp_name", type="string", nullable=true)
  65. */
  66. private $mpName;
  67. /**
  68. * @var string
  69. *
  70. * @ORM\Column(name="browser", type="string", nullable=true)
  71. */
  72. private $browser;
  73. /**
  74. * @var \DateTime
  75. *
  76. * @ORM\Column(name="timestamp", type="datetime", nullable=true)
  77. */
  78. private $timestamp;
  79. /**
  80. * @var bool
  81. *
  82. * @ORM\Column(name="is_teacher", type="boolean", nullable=true)
  83. */
  84. private $isTeacher;
  85. /**
  86. * @var User
  87. *
  88. * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User")
  89. * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  90. */
  91. private $user;
  92. /**
  93. * @var \DateTime
  94. *
  95. * @ORM\Column(type="datetime", nullable=true)
  96. */
  97. private $dateResolved;
  98. /**
  99. * @return int
  100. */
  101. public function getId(): int
  102. {
  103. return $this->id;
  104. }
  105. public function getSessionId(): ?int
  106. {
  107. return $this->sessionId;
  108. }
  109. public function setSessionId(int $sessionId)
  110. {
  111. $this->sessionId = $sessionId;
  112. }
  113. public function getProblem(): Mathproblem
  114. {
  115. return $this->problem;
  116. }
  117. public function setProblem(Mathproblem $problem): void
  118. {
  119. $this->problem = $problem;
  120. }
  121. /**
  122. * @return bool
  123. */
  124. public function isMpError(): bool
  125. {
  126. return $this->mpError;
  127. }
  128. /**
  129. * @param bool $mpError
  130. */
  131. public function setMpError(bool $mpError)
  132. {
  133. $this->mpError = $mpError;
  134. }
  135. public function isMpCurriculum(): bool
  136. {
  137. return $this->mpCurriculum;
  138. }
  139. /**
  140. * @param bool $mpCurriculum
  141. */
  142. public function setMpCurriculum(bool $mpCurriculum)
  143. {
  144. $this->mpCurriculum = $mpCurriculum;
  145. }
  146. /**
  147. * @return bool
  148. */
  149. public function isMpUnderstanding(): bool
  150. {
  151. return $this->mpUnderstanding;
  152. }
  153. /**
  154. * @param bool $mpUnderstanding
  155. */
  156. public function setMpUnderstanding(bool $mpUnderstanding)
  157. {
  158. $this->mpUnderstanding = $mpUnderstanding;
  159. }
  160. /**
  161. * @return bool
  162. */
  163. public function isMpTechnical(): bool
  164. {
  165. return $this->mpTechnical;
  166. }
  167. /**
  168. * @param bool $mpTechnical
  169. */
  170. public function setMpTechnical(bool $mpTechnical): void
  171. {
  172. $this->mpTechnical = $mpTechnical;
  173. }
  174. /**
  175. * @return string
  176. */
  177. public function getMessage(): string
  178. {
  179. return $this->message;
  180. }
  181. /**
  182. * @param string $message
  183. */
  184. public function setMessage(string $message)
  185. {
  186. $this->message = $message;
  187. }
  188. /**
  189. * @return string
  190. */
  191. public function getMpName()
  192. {
  193. return $this->mpName;
  194. }
  195. /**
  196. * @param string $mpName
  197. */
  198. public function setMpName($mpName)
  199. {
  200. $this->mpName = $mpName;
  201. }
  202. /**
  203. * @return bool
  204. */
  205. public function isTeacher(): ?bool
  206. {
  207. return $this->isTeacher;
  208. }
  209. /**
  210. * @param bool $isTeacher
  211. */
  212. public function setIsTeacher($isTeacher)
  213. {
  214. $this->isTeacher = $isTeacher;
  215. }
  216. /**
  217. * @return User
  218. */
  219. public function getUser()
  220. {
  221. return $this->user;
  222. }
  223. /**
  224. * @param User $user
  225. */
  226. public function setUser($user)
  227. {
  228. $this->user = $user;
  229. }
  230. /**
  231. * @return string
  232. */
  233. public function getBrowser()
  234. {
  235. return $this->browser;
  236. }
  237. /**
  238. * @param string $browser
  239. */
  240. public function setBrowser($browser)
  241. {
  242. $this->browser = $browser;
  243. }
  244. /**
  245. * @return \DateTime
  246. */
  247. public function getTimestamp()
  248. {
  249. return $this->timestamp;
  250. }
  251. /**
  252. * @param \DateTime $timestamp
  253. */
  254. public function setTimestamp($timestamp)
  255. {
  256. $this->timestamp = $timestamp;
  257. }
  258. public function getDateResolved(): ?\DateTime
  259. {
  260. return $this->dateResolved;
  261. }
  262. public function setDateResolved(\DateTime $dateResolved)
  263. {
  264. $this->dateResolved = $dateResolved;
  265. }
  266. public function getSnippet(): string
  267. {
  268. return $this->problem->getSnippet();
  269. }
  270. public function getTopic(): ?string
  271. {
  272. return $this->problem->getTemplate()->getTopic()->getName();
  273. }
  274. }