src/Entity/Appointment/Log.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Appointment;
  3. use App\Entity\AppUser;
  4. use App\Entity\Appointment;
  5. use App\Repository\Appointment\LogRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LogRepository::class)
  9.  * @ORM\Table(name="appointment_log")
  10.  */
  11. class Log
  12. {
  13.     const ACTION_CHANGE_STATUS 'change_status';
  14.     CONST ACTION_MODIFY 'modify';
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="datetime_immutable")
  23.      */
  24.     private $createdAt;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=AppUser::class)
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $createdBy;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Appointment::class, inversedBy="logs")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $appointment;
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $action;
  39.     /**
  40.      * @ORM\Column(type="text")
  41.      */
  42.     private $extraInfo;
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getCreatedAt(): ?\DateTimeImmutable
  48.     {
  49.         return $this->createdAt;
  50.     }
  51.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  52.     {
  53.         $this->createdAt $createdAt;
  54.         return $this;
  55.     }
  56.     public function getCreatedBy(): ?AppUser
  57.     {
  58.         return $this->createdBy;
  59.     }
  60.     public function setCreatedBy(?AppUser $createdBy): self
  61.     {
  62.         $this->createdBy $createdBy;
  63.         return $this;
  64.     }
  65.     public function getAppointment(): ?Appointment
  66.     {
  67.         return $this->appointment;
  68.     }
  69.     public function setAppointment(?Appointment $appointment): self
  70.     {
  71.         $this->appointment $appointment;
  72.         return $this;
  73.     }
  74.     public function getAction(): ?string
  75.     {
  76.         return $this->action;
  77.     }
  78.     public function setAction(string $action): self
  79.     {
  80.         $this->action $action;
  81.         return $this;
  82.     }
  83.     public function getExtraInfo(): ?string
  84.     {
  85.         return $this->extraInfo;
  86.     }
  87.     public function setExtraInfo(string $extraInfo): self
  88.     {
  89.         $this->extraInfo $extraInfo;
  90.         return $this;
  91.     }
  92. }