src/Entity/ChatMessages.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChatMessagesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassChatMessagesRepository::class)]
  6. class ChatMessages
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityOrders::class, inversedBy'chatMessages')]
  13.     private $orders;
  14.     #[ORM\Column(type'text')]
  15.     private $message;
  16.     #[ORM\Column(type'boolean')]
  17.     private $isDistributor;
  18.     #[ORM\Column(type'boolean')]
  19.     private $isClinic;
  20.     #[ORM\Column(type'datetime')]
  21.     private $modified;
  22.     #[ORM\Column(type'datetime')]
  23.     private $created;
  24.     #[ORM\ManyToOne(targetEntityDistributors::class, inversedBy'chatMessages')]
  25.     private $distributor;
  26.     public function __construct()
  27.     {
  28.         $this->setModified(new \DateTime());
  29.         if ($this->getCreated() == null) {
  30.             $this->setCreated(new \DateTime());
  31.         }
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getOrders(): ?Orders
  38.     {
  39.         return $this->orders;
  40.     }
  41.     public function setOrders(?Orders $orders): self
  42.     {
  43.         $this->orders $orders;
  44.         return $this;
  45.     }
  46.     public function getMessage(): ?string
  47.     {
  48.         return $this->message;
  49.     }
  50.     public function setMessage(string $message): self
  51.     {
  52.         $this->message $message;
  53.         return $this;
  54.     }
  55.     public function getIsDistributor(): ?bool
  56.     {
  57.         return $this->isDistributor;
  58.     }
  59.     public function setIsDistributor(bool $isDistributor): self
  60.     {
  61.         $this->isDistributor $isDistributor;
  62.         return $this;
  63.     }
  64.     public function getIsClinic(): ?bool
  65.     {
  66.         return $this->isClinic;
  67.     }
  68.     public function setIsClinic(bool $isClinic): self
  69.     {
  70.         $this->isClinic $isClinic;
  71.         return $this;
  72.     }
  73.     public function getModified(): ?\DateTimeInterface
  74.     {
  75.         return $this->modified;
  76.     }
  77.     public function setModified(\DateTimeInterface $modified): self
  78.     {
  79.         $this->modified $modified;
  80.         return $this;
  81.     }
  82.     public function getCreated(): ?\DateTimeInterface
  83.     {
  84.         return $this->created;
  85.     }
  86.     public function setCreated(\DateTimeInterface $created): self
  87.     {
  88.         $this->created $created;
  89.         return $this;
  90.     }
  91.     public function getDistributor(): ?Distributors
  92.     {
  93.         return $this->distributor;
  94.     }
  95.     public function setDistributor(?Distributors $distributor): self
  96.     {
  97.         $this->distributor $distributor;
  98.         return $this;
  99.     }
  100. }