<?php
namespace App\Entity\Dispatch;
use App\Entity\AppUser;
use App\Repository\Dispatch\LogRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LogRepository::class)
* @ORM\Table(name="dispatch_log")
*/
class Log
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Dispatch::class, inversedBy="logs")
* @ORM\JoinColumn(nullable=false)
*/
private $dispatch;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=AppUser::class, inversedBy="dispatchLogs")
* @ORM\JoinColumn(nullable=false)
*/
private $createdBy;
/**
* @ORM\Column(type="string", length=255)
*/
private $operation;
/**
* @ORM\Column(type="text")
*/
private $extraInfo;
public function getId(): ?int
{
return $this->id;
}
public function getDispatch(): ?Dispatch
{
return $this->dispatch;
}
public function setDispatch(?Dispatch $dispatch): self
{
$this->dispatch = $dispatch;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedBy(): ?AppUser
{
return $this->createdBy;
}
public function setCreatedBy(?AppUser $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getOperation(): ?string
{
return $this->operation;
}
public function setOperation(string $operation): self
{
$this->operation = $operation;
return $this;
}
public function getExtraInfo(): ?string
{
return $this->extraInfo;
}
public function setExtraInfo(string $extraInfo): self
{
$this->extraInfo = $extraInfo;
return $this;
}
}