src/Entity/PrivateMessage.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Utils\ExtendedEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\PrivateMessageRepository")
  7.  */
  8. class PrivateMessage
  9. {
  10.     use ExtendedEntity;
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Offer", inversedBy="privateMessages")
  19.      */
  20.     private $offer;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Inquiry", inversedBy="privateMessages")
  23.      */
  24.     private $inquiry;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="privateMessages")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $author;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="receivedMessages")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $recipient;
  35.     /**
  36.      * @ORM\Column(type="text")
  37.      */
  38.     private $content;
  39.     /**
  40.      * @ORM\OneToMany(targetEntity="App\Entity\PrivateMessageAttachment", mappedBy="privateMessage", cascade={"persist"})
  41.      */
  42.     private $attachmentFiles;
  43.     /**
  44.      * @ORM\Column(name="read_at", type="datetime", nullable=true)
  45.      */
  46.     private $readAt;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\PrivateMessage")
  49.      */
  50.     private $parent;
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getOffer(): ?Offer
  56.     {
  57.         return $this->offer;
  58.     }
  59.     public function setOffer(?Offer $offer): self
  60.     {
  61.         $this->offer $offer;
  62.         return $this;
  63.     }
  64.     public function getInquiry()
  65.     {
  66.         return $this->inquiry;
  67.     }
  68.     public function setInquiry($inquiry): void
  69.     {
  70.         $this->inquiry $inquiry;
  71.     }
  72.     public function getAuthor(): ?Customer
  73.     {
  74.         return $this->author;
  75.     }
  76.     public function setAuthor(?Customer $author): self
  77.     {
  78.         $this->author $author;
  79.         return $this;
  80.     }
  81.     public function getRecipient(): ?Customer
  82.     {
  83.         return $this->recipient;
  84.     }
  85.     public function setRecipient(?Customer $recipient): self
  86.     {
  87.         $this->recipient $recipient;
  88.         return $this;
  89.     }
  90.     public function getContent(): ?string
  91.     {
  92.         return $this->content;
  93.     }
  94.     public function setContent(string $content): self
  95.     {
  96.         $this->content $content;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return mixed
  101.      */
  102.     public function getAttachmentFiles()
  103.     {
  104.         return $this->attachmentFiles;
  105.     }
  106.     /**
  107.      * @param mixed $attachmentFiles
  108.      */
  109.     public function setAttachmentFiles($attachmentFiles): void
  110.     {
  111.         $this->attachmentFiles $attachmentFiles;
  112.     }
  113.     /**
  114.      * @return mixed
  115.      */
  116.     public function getReadAt()
  117.     {
  118.         return $this->readAt;
  119.     }
  120.     /**
  121.      * @param mixed $readAt
  122.      */
  123.     public function setReadAt($readAt): void
  124.     {
  125.         $this->readAt $readAt;
  126.     }
  127.     /**
  128.      * @param mixed $parent
  129.      */
  130.     public function setParent(?self $parent): void
  131.     {
  132.         $this->parent $parent;
  133.     }
  134.     /**
  135.      * @return mixed
  136.      */
  137.     public function getParent() : ?self
  138.     {
  139.         return $this->parent;
  140.     }
  141. }