<?php
namespace App\Entity\Appointment;
use App\Entity\AppUser;
use App\Entity\Appointment;
use App\Repository\Appointment\LogRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LogRepository::class)
* @ORM\Table(name="appointment_log")
*/
class Log
{
const ACTION_CHANGE_STATUS = 'change_status';
CONST ACTION_MODIFY = 'modify';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=AppUser::class)
* @ORM\JoinColumn(nullable=false)
*/
private $createdBy;
/**
* @ORM\ManyToOne(targetEntity=Appointment::class, inversedBy="logs")
* @ORM\JoinColumn(nullable=false)
*/
private $appointment;
/**
* @ORM\Column(type="string", length=255)
*/
private $action;
/**
* @ORM\Column(type="text")
*/
private $extraInfo;
public function getId(): ?int
{
return $this->id;
}
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 getAppointment(): ?Appointment
{
return $this->appointment;
}
public function setAppointment(?Appointment $appointment): self
{
$this->appointment = $appointment;
return $this;
}
public function getAction(): ?string
{
return $this->action;
}
public function setAction(string $action): self
{
$this->action = $action;
return $this;
}
public function getExtraInfo(): ?string
{
return $this->extraInfo;
}
public function setExtraInfo(string $extraInfo): self
{
$this->extraInfo = $extraInfo;
return $this;
}
}