src/Entity/LogUserStep.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogUserStepRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Uid\Uuid;
  6. #[ORM\Entity(repositoryClass: LogUserStepRepository::class)]
  7. #[ORM\Table(options: ['row_format' => 'DYNAMIC'])]
  8. #[ORM\Index(name: 'log_user_step_user_lookup_idx', columns: ['username'])]
  9. #[ORM\Index(name: 'log_user_step_date_lookup_idx', columns: ['logged_at'])]
  10. #[ORM\Index(name: 'log_user_step_route_lookup_idx', columns: ['route'])]
  11. #[ORM\Index(name: 'log_user_step_enterprise_lookup_idx', columns: ['enterprise_id'])]
  12. #[ORM\Index(name: 'log_user_step_verbund_lookup_idx', columns: ['verbund_id'])]
  13. class LogUserStep
  14. {
  15. #[ORM\Id]
  16. #[ORM\Column(type: 'uuid', unique: true)]
  17. private Uuid $id;
  18. #[ORM\Column(name: 'username', type: 'string', length: 255, nullable: true)]
  19. private ?string $username = null;
  20. #[ORM\Column(name: 'impersonated_by', type: 'string', length: 255, nullable: true)]
  21. private ?string $impersonatedBy = null;
  22. #[ORM\Column(name: 'route', type: 'string', length: 255, nullable: true)]
  23. private ?string $route = null;
  24. #[ORM\Column(name: 'url', type: 'string', length: 1024, nullable: true)]
  25. private ?string $url = null;
  26. #[ORM\Column(name: 'controller', type: 'string', length: 255, nullable: true)]
  27. private ?string $controller = null;
  28. #[ORM\Column(name: 'action', type: 'string', length: 255, nullable: true)]
  29. private ?string $action = null;
  30. #[ORM\Column(name: 'method', type: 'string', length: 10, nullable: true)]
  31. private ?string $method = null;
  32. #[ORM\Column(name: 'logged_at', type: 'datetime')]
  33. private \DateTime $loggedAt;
  34. #[ORM\Column(name: 'enterprise_id', type: 'string', length: 36, nullable: true)]
  35. private ?string $enterpriseId = null;
  36. #[ORM\Column(name: 'verbund_id', type: 'string', length: 36, nullable: true)]
  37. private ?string $verbundId = null;
  38. public function __construct()
  39. {
  40. $this->id = Uuid::v4();
  41. $this->loggedAt = new \DateTime();
  42. }
  43. public function getId(): Uuid
  44. {
  45. return $this->id;
  46. }
  47. public function getUsername(): ?string
  48. {
  49. return $this->username;
  50. }
  51. public function setUsername(?string $username): self
  52. {
  53. $this->username = $username;
  54. return $this;
  55. }
  56. public function getImpersonatedBy(): ?string
  57. {
  58. return $this->impersonatedBy;
  59. }
  60. public function setImpersonatedBy(?string $impersonatedBy): self
  61. {
  62. $this->impersonatedBy = $impersonatedBy;
  63. return $this;
  64. }
  65. public function getRoute(): ?string
  66. {
  67. return $this->route;
  68. }
  69. public function setRoute(?string $route): self
  70. {
  71. $this->route = $route;
  72. return $this;
  73. }
  74. public function getUrl(): ?string
  75. {
  76. return $this->url;
  77. }
  78. public function setUrl(?string $url): self
  79. {
  80. $this->url = $url;
  81. return $this;
  82. }
  83. public function getController(): ?string
  84. {
  85. return $this->controller;
  86. }
  87. public function setController(?string $controller): self
  88. {
  89. $this->controller = $controller;
  90. return $this;
  91. }
  92. public function getAction(): ?string
  93. {
  94. return $this->action;
  95. }
  96. public function setAction(?string $action): self
  97. {
  98. $this->action = $action;
  99. return $this;
  100. }
  101. public function getMethod(): ?string
  102. {
  103. return $this->method;
  104. }
  105. public function setMethod(?string $method): self
  106. {
  107. $this->method = $method;
  108. return $this;
  109. }
  110. public function getLoggedAt(): \DateTime
  111. {
  112. return $this->loggedAt;
  113. }
  114. public function setLoggedAt(\DateTime $loggedAt = null): self
  115. {
  116. $this->loggedAt = $loggedAt ?: new \DateTime();
  117. return $this;
  118. }
  119. public function getEnterpriseId(): ?string
  120. {
  121. return $this->enterpriseId;
  122. }
  123. public function setEnterpriseId(?string $enterpriseId): self
  124. {
  125. $this->enterpriseId = $enterpriseId;
  126. return $this;
  127. }
  128. public function getVerbundId(): ?string
  129. {
  130. return $this->verbundId;
  131. }
  132. public function setVerbundId(?string $verbundId): self
  133. {
  134. $this->verbundId = $verbundId;
  135. return $this;
  136. }
  137. }