<?php
namespace App\Entity;
use App\Repository\LogUserStepRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: LogUserStepRepository::class)]
#[ORM\Table(options: ['row_format' => 'DYNAMIC'])]
#[ORM\Index(name: 'log_user_step_user_lookup_idx', columns: ['username'])]
#[ORM\Index(name: 'log_user_step_date_lookup_idx', columns: ['logged_at'])]
#[ORM\Index(name: 'log_user_step_route_lookup_idx', columns: ['route'])]
#[ORM\Index(name: 'log_user_step_enterprise_lookup_idx', columns: ['enterprise_id'])]
#[ORM\Index(name: 'log_user_step_verbund_lookup_idx', columns: ['verbund_id'])]
class LogUserStep
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private Uuid $id;
#[ORM\Column(name: 'username', type: 'string', length: 255, nullable: true)]
private ?string $username = null;
#[ORM\Column(name: 'impersonated_by', type: 'string', length: 255, nullable: true)]
private ?string $impersonatedBy = null;
#[ORM\Column(name: 'route', type: 'string', length: 255, nullable: true)]
private ?string $route = null;
#[ORM\Column(name: 'url', type: 'string', length: 1024, nullable: true)]
private ?string $url = null;
#[ORM\Column(name: 'controller', type: 'string', length: 255, nullable: true)]
private ?string $controller = null;
#[ORM\Column(name: 'action', type: 'string', length: 255, nullable: true)]
private ?string $action = null;
#[ORM\Column(name: 'method', type: 'string', length: 10, nullable: true)]
private ?string $method = null;
#[ORM\Column(name: 'logged_at', type: 'datetime')]
private \DateTime $loggedAt;
#[ORM\Column(name: 'enterprise_id', type: 'string', length: 36, nullable: true)]
private ?string $enterpriseId = null;
#[ORM\Column(name: 'verbund_id', type: 'string', length: 36, nullable: true)]
private ?string $verbundId = null;
public function __construct()
{
$this->id = Uuid::v4();
$this->loggedAt = new \DateTime();
}
public function getId(): Uuid
{
return $this->id;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(?string $username): self
{
$this->username = $username;
return $this;
}
public function getImpersonatedBy(): ?string
{
return $this->impersonatedBy;
}
public function setImpersonatedBy(?string $impersonatedBy): self
{
$this->impersonatedBy = $impersonatedBy;
return $this;
}
public function getRoute(): ?string
{
return $this->route;
}
public function setRoute(?string $route): self
{
$this->route = $route;
return $this;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(?string $url): self
{
$this->url = $url;
return $this;
}
public function getController(): ?string
{
return $this->controller;
}
public function setController(?string $controller): self
{
$this->controller = $controller;
return $this;
}
public function getAction(): ?string
{
return $this->action;
}
public function setAction(?string $action): self
{
$this->action = $action;
return $this;
}
public function getMethod(): ?string
{
return $this->method;
}
public function setMethod(?string $method): self
{
$this->method = $method;
return $this;
}
public function getLoggedAt(): \DateTime
{
return $this->loggedAt;
}
public function setLoggedAt(\DateTime $loggedAt = null): self
{
$this->loggedAt = $loggedAt ?: new \DateTime();
return $this;
}
public function getEnterpriseId(): ?string
{
return $this->enterpriseId;
}
public function setEnterpriseId(?string $enterpriseId): self
{
$this->enterpriseId = $enterpriseId;
return $this;
}
public function getVerbundId(): ?string
{
return $this->verbundId;
}
public function setVerbundId(?string $verbundId): self
{
$this->verbundId = $verbundId;
return $this;
}
}