<?php
namespace App\Entity;
use App\Repository\GuardianActionLogRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=GuardianActionLogRepository::class)
*/
class GuardianActionLog
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"GuardianActionList"})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Guardian::class, inversedBy="guardianActionLogs")
*/
private $guardian;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"GuardianActionList"})
*/
private $createdAt;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"GuardianActionList"})
*/
private $userId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianActionList"})
*/
private $userType;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianActionList"})
*/
private $mailSent = 0;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"GuardianActionList"})
*/
private $objectId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianActionList"})
*/
private $objectType;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianActionList"})
*/
private $route;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianActionList"})
*/
private $actionType;
/**
* @ORM\Column(type="text", nullable=true)
* @Groups({"GuardianActionList"})
*/
private $data;
public function __construct()
{
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getGuardian(): ?Guardian
{
return $this->guardian;
}
public function setGuardian(?Guardian $guardian): self
{
$this->guardian = $guardian;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUserId(): ?int
{
return $this->userId;
}
public function setUserId(?int $userId): self
{
$this->userId = $userId;
return $this;
}
public function getUserType(): ?string
{
return $this->userType;
}
public function setUserType(?string $userType): self
{
$this->userType = $userType;
return $this;
}
public function isMailSent(): ?bool
{
return $this->mailSent;
}
public function setMailSent(?bool $mailSent): self
{
$this->mailSent = $mailSent;
return $this;
}
public function getObjectId(): ?int
{
return $this->objectId;
}
public function setObjectId(?int $objectId): self
{
$this->objectId = $objectId;
return $this;
}
public function getObjectType(): ?string
{
return $this->objectType;
}
public function setObjectType(?string $objectType): self
{
$this->objectType = $objectType;
return $this;
}
public function getRoute(): ?string
{
return $this->route;
}
public function setRoute(?string $route): self
{
$this->route = $route;
return $this;
}
public function getActionType(): ?string
{
return $this->actionType;
}
public function setActionType(?string $actionType): self
{
$this->actionType = $actionType;
return $this;
}
public function getData(): ?string
{
return $this->data;
}
public function setData(?string $data): self
{
$this->data = $data;
return $this;
}
}