src/Entity/Gos/Consultant/ConsultantMessage.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Consultant;
  3. use App\Repository\Gos\Consultant\ConsultantMessageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ConsultantMessageRepository::class)
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class ConsultantMessage
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=ConsultantRoomQueue::class, inversedBy="consultantMessages")
  20.      * @ORM\JoinColumn(onDelete="SET NULL")
  21.      */
  22.     private $consultantRoomQueue;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=ConsultantRoom::class, inversedBy="consultantMessages")
  25.      * @ORM\JoinColumn(onDelete="SET NULL")
  26.      */
  27.     private $consultantRoom;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=ConsultantHistory::class, inversedBy="consultantMessages")
  30.      */
  31.     private $consultantHistory;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      * @Assert\NotBlank(message="Wprowadź wiadomość")
  35.      * @Assert\Length(max=255, maxMessage="Przekroczono maksymalną liczbę {{ limit }} znaków")
  36.      */
  37.     private $content;
  38.     /**
  39.      * @ORM\Column(type="boolean", options={"default": false})
  40.      */
  41.     private $isConsultantMessage false;
  42.     /**
  43.      * @ORM\Column(type="datetime")
  44.      */
  45.     private $createdAt;
  46.     /** @ORM\PrePersist() */
  47.     public function prePersist()
  48.     {
  49.         $this->createdAt = new \DateTime();
  50.     }
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getConsultantRoomQueue(): ?ConsultantRoomQueue
  56.     {
  57.         return $this->consultantRoomQueue;
  58.     }
  59.     public function setConsultantRoomQueue(?ConsultantRoomQueue $consultantRoomQueue): self
  60.     {
  61.         $this->consultantRoomQueue $consultantRoomQueue;
  62.         return $this;
  63.     }
  64.     public function getConsultantRoom(): ?ConsultantRoom
  65.     {
  66.         return $this->consultantRoom;
  67.     }
  68.     public function setConsultantRoom(?ConsultantRoom $consultantRoom): self
  69.     {
  70.         $this->consultantRoom $consultantRoom;
  71.         return $this;
  72.     }
  73.     public function getConsultantHistory(): ?ConsultantHistory
  74.     {
  75.         return $this->consultantHistory;
  76.     }
  77.     public function setConsultantHistory(?ConsultantHistory $consultantHistory): self
  78.     {
  79.         $this->consultantHistory $consultantHistory;
  80.         return $this;
  81.     }
  82.     public function getContent(): ?string
  83.     {
  84.         return $this->content;
  85.     }
  86.     public function setContent(string $content): self
  87.     {
  88.         $this->content $content;
  89.         return $this;
  90.     }
  91.     public function getIsConsultantMessage(): ?bool
  92.     {
  93.         return $this->isConsultantMessage;
  94.     }
  95.     public function setIsConsultantMessage(bool $isConsultantMessage): self
  96.     {
  97.         $this->isConsultantMessage $isConsultantMessage;
  98.         return $this;
  99.     }
  100.     public function getCreatedAt(): ?\DateTimeInterface
  101.     {
  102.         return $this->createdAt;
  103.     }
  104.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  105.     {
  106.         $this->createdAt $createdAt;
  107.         return $this;
  108.     }
  109. }