src/Entity/Core/Log/LogEvent.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\Log;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table('log_events')]
  6. #[ORM\Entity(repositoryClass: LogEventRepository::class)]
  7. class LogEvent
  8. {
  9. /**
  10. * @var int
  11. */
  12. #[ORM\Column(name: 'id', type: 'integer')]
  13. #[ORM\Id]
  14. #[ORM\GeneratedValue(strategy: 'AUTO')]
  15. private $id;
  16. /**
  17. * @var DateTime
  18. */
  19. #[ORM\Column(name: 'timestamp', type: 'datetime')]
  20. private $timestamp;
  21. /**
  22. * @var string
  23. */
  24. #[ORM\Column(name: 'event', type: 'text')]
  25. private $event;
  26. /**
  27. * @var string
  28. */
  29. #[ORM\Column(name: 'username', type: 'text')]
  30. private $username;
  31. /**
  32. * @var string
  33. */
  34. #[ORM\Column(name: 'institution', type: 'text', nullable: true)]
  35. private $institution;
  36. /**
  37. * @var bool
  38. */
  39. #[ORM\Column(name: 'is_teacher', type: 'boolean')]
  40. private $isTeacher;
  41. /**
  42. * @var string|null
  43. */
  44. #[ORM\Column(name: 'serialized_request_data', type: 'text', nullable: true)]
  45. private ?string $serializedRequestData;
  46. /**
  47. * @var DateTime|null
  48. */
  49. #[ORM\Column(name: 'dispatched_at', type: 'datetime', nullable: true)]
  50. private ?DateTime $dispatchedAt;
  51. /**
  52. * @var string|null
  53. */
  54. #[ORM\Column(name: 'not_dispatched_cause', type: 'text', nullable: true)]
  55. private ?string $notDispatchedCause;
  56. public function __construct($timestamp, $event, $username, $institution, $isTeacher, $dispatchedAt, $serializedRequestData, $notDispatchedCause = '')
  57. {
  58. $this->timestamp = $timestamp;
  59. $this->event = $event;
  60. $this->username = $username;
  61. $this->institution = $institution;
  62. $this->isTeacher = $isTeacher;
  63. $this->dispatchedAt = $dispatchedAt;
  64. $this->serializedRequestData = $serializedRequestData;
  65. $this->notDispatchedCause = $notDispatchedCause;
  66. }
  67. public function getId(): int
  68. {
  69. return $this->id;
  70. }
  71. public function setId(int $id): void
  72. {
  73. $this->id = $id;
  74. }
  75. public function getTimestamp(): DateTime
  76. {
  77. return $this->timestamp;
  78. }
  79. public function setTimestamp(DateTime $timestamp): void
  80. {
  81. $this->timestamp = $timestamp;
  82. }
  83. public function getEvent(): ?string
  84. {
  85. return $this->event;
  86. }
  87. public function setEvent(string $event): void
  88. {
  89. $this->event = $event;
  90. }
  91. public function getUsername(): ?string
  92. {
  93. return $this->username;
  94. }
  95. public function setUsername(string $username): void
  96. {
  97. $this->username = $username;
  98. }
  99. public function getInstitution(): string
  100. {
  101. return $this->institution;
  102. }
  103. public function setInstitution(string $institution): void
  104. {
  105. $this->institution = $institution;
  106. }
  107. public function isTeacher(): bool
  108. {
  109. return $this->isTeacher;
  110. }
  111. public function setIsTeacher(bool $isTeacher): void
  112. {
  113. $this->isTeacher = $isTeacher;
  114. }
  115. public function getDispatchedAt(): ?DateTime
  116. {
  117. return $this->dispatchedAt;
  118. }
  119. public function setDispatchedAt(?DateTime $dispatchedAt): void
  120. {
  121. $this->dispatchedAt = $dispatchedAt;
  122. }
  123. public function getSerializedRequestData(): ?string
  124. {
  125. return $this->serializedRequestData;
  126. }
  127. public function setSerializedRequestData(?string $data): void
  128. {
  129. $this->serializedRequestData = $data;
  130. }
  131. public function getNotDispatchedCause(): ?string
  132. {
  133. return $this->notDispatchedCause;
  134. }
  135. public function setNotDispatchedCause(?string $notDispatchedCause): void
  136. {
  137. $this->notDispatchedCause = $notDispatchedCause;
  138. }
  139. }