src/CoreBundle/Entity/LogEvent.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("log_events")
  7. * @ORM\Entity(repositoryClass="LogEventRepository")
  8. */
  9. class LogEvent
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @var DateTime
  21. *
  22. * @ORM\Column(name="timestamp", type="datetime")
  23. */
  24. private $timestamp;
  25. /**
  26. * @var string
  27. *
  28. * @ORM\Column(name="event", type="text")
  29. */
  30. private $event;
  31. /**
  32. * @var string
  33. *
  34. * @ORM\Column(name="username", type="text")
  35. */
  36. private $username;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="institution", type="text", nullable=true)
  41. */
  42. private $institution;
  43. /**
  44. * @var bool
  45. *
  46. * @ORM\Column(name="is_teacher", type="boolean")
  47. */
  48. private $isTeacher;
  49. /**
  50. * @var string|null
  51. *
  52. * @ORM\Column(name="serialized_request_data", type="text", nullable=true)
  53. */
  54. private ?string $serializedRequestData;
  55. /**
  56. * @var DateTime|null
  57. *
  58. * @ORM\Column(name="dispatched_at", type="datetime", nullable=true)
  59. */
  60. private ?DateTime $dispatchedAt;
  61. /**
  62. * @var string|null
  63. *
  64. * @ORM\Column(name="not_dispatched_cause", type="text", nullable=true)
  65. */
  66. private ?string $notDispatchedCause;
  67. public function __construct($timestamp, $event, $username, $institution, $isTeacher, $dispatchedAt, $serializedRequestData, $notDispatchedCause = '')
  68. {
  69. $this->timestamp = $timestamp;
  70. $this->event = $event;
  71. $this->username = $username;
  72. $this->institution = $institution;
  73. $this->isTeacher = $isTeacher;
  74. $this->dispatchedAt = $dispatchedAt;
  75. $this->serializedRequestData = $serializedRequestData;
  76. $this->notDispatchedCause = $notDispatchedCause;
  77. }
  78. /**
  79. * @return int
  80. */
  81. public function getId(): int
  82. {
  83. return $this->id;
  84. }
  85. /**
  86. * @param int $id
  87. */
  88. public function setId(int $id): void
  89. {
  90. $this->id = $id;
  91. }
  92. /**
  93. * @return DateTime
  94. */
  95. public function getTimestamp(): DateTime
  96. {
  97. return $this->timestamp;
  98. }
  99. /**
  100. * @param DateTime $timestamp
  101. */
  102. public function setTimestamp(DateTime $timestamp): void
  103. {
  104. $this->timestamp = $timestamp;
  105. }
  106. /**
  107. * @return string|null
  108. */
  109. public function getEvent(): ?string
  110. {
  111. return $this->event;
  112. }
  113. /**
  114. * @param string $event
  115. */
  116. public function setEvent(string $event): void
  117. {
  118. $this->event = $event;
  119. }
  120. /**
  121. * @return string|null
  122. */
  123. public function getUsername(): ?string
  124. {
  125. return $this->username;
  126. }
  127. /**
  128. * @param string $username
  129. */
  130. public function setUsername(string $username): void
  131. {
  132. $this->username = $username;
  133. }
  134. /**
  135. * @return string
  136. */
  137. public function getInstitution(): string
  138. {
  139. return $this->institution;
  140. }
  141. /**
  142. * @param string $institution
  143. */
  144. public function setInstitution(string $institution): void
  145. {
  146. $this->institution = $institution;
  147. }
  148. /**
  149. * @return bool
  150. */
  151. public function isTeacher(): bool
  152. {
  153. return $this->isTeacher;
  154. }
  155. /**
  156. * @param bool $isTeacher
  157. */
  158. public function setIsTeacher(bool $isTeacher): void
  159. {
  160. $this->isTeacher = $isTeacher;
  161. }
  162. public function getDispatchedAt(): ?DateTime
  163. {
  164. return $this->dispatchedAt;
  165. }
  166. /**
  167. * @param DateTime|null $dispatchedAt
  168. * @return void
  169. */
  170. public function setDispatchedAt(?DateTime $dispatchedAt): void
  171. {
  172. $this->dispatchedAt = $dispatchedAt;
  173. }
  174. public function getSerializedRequestData(): ?string
  175. {
  176. return $this->serializedRequestData;
  177. }
  178. /**
  179. * @param string|null $data
  180. * @return void
  181. */
  182. public function setSerializedRequestData(?string $data): void
  183. {
  184. $this->serializedRequestData = $data;
  185. }
  186. public function getNotDispatchedCause(): ?string
  187. {
  188. return $this->notDispatchedCause;
  189. }
  190. /**
  191. * @param string|null $notDispatchedCause
  192. * @return void
  193. */
  194. public function setNotDispatchedCause(?string $notDispatchedCause): void
  195. {
  196. $this->notDispatchedCause = $notDispatchedCause;
  197. }
  198. }