<?phpnamespace App\Entity;use App\Utils\ExtendedEntity;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\PrivateMessageRepository") */class PrivateMessage{ use ExtendedEntity; /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity="App\Entity\Offer", inversedBy="privateMessages") */ private $offer; /** * @ORM\ManyToOne(targetEntity="App\Entity\Inquiry", inversedBy="privateMessages") */ private $inquiry; /** * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="privateMessages") * @ORM\JoinColumn(nullable=false) */ private $author; /** * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="receivedMessages") * @ORM\JoinColumn(nullable=false) */ private $recipient; /** * @ORM\Column(type="text") */ private $content; /** * @ORM\OneToMany(targetEntity="App\Entity\PrivateMessageAttachment", mappedBy="privateMessage", cascade={"persist"}) */ private $attachmentFiles; /** * @ORM\Column(name="read_at", type="datetime", nullable=true) */ private $readAt; /** * @ORM\ManyToOne(targetEntity="App\Entity\PrivateMessage") */ private $parent; public function getId(): ?int { return $this->id; } public function getOffer(): ?Offer { return $this->offer; } public function setOffer(?Offer $offer): self { $this->offer = $offer; return $this; } public function getInquiry() { return $this->inquiry; } public function setInquiry($inquiry): void { $this->inquiry = $inquiry; } public function getAuthor(): ?Customer { return $this->author; } public function setAuthor(?Customer $author): self { $this->author = $author; return $this; } public function getRecipient(): ?Customer { return $this->recipient; } public function setRecipient(?Customer $recipient): self { $this->recipient = $recipient; return $this; } public function getContent(): ?string { return $this->content; } public function setContent(string $content): self { $this->content = $content; return $this; } /** * @return mixed */ public function getAttachmentFiles() { return $this->attachmentFiles; } /** * @param mixed $attachmentFiles */ public function setAttachmentFiles($attachmentFiles): void { $this->attachmentFiles = $attachmentFiles; } /** * @return mixed */ public function getReadAt() { return $this->readAt; } /** * @param mixed $readAt */ public function setReadAt($readAt): void { $this->readAt = $readAt; } /** * @param mixed $parent */ public function setParent(?self $parent): void { $this->parent = $parent; } /** * @return mixed */ public function getParent() : ?self { return $this->parent; }}