| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace App\Entity;
- use App\Repository\PrivateMessageRepository;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity(repositoryClass=PrivateMessageRepository::class)
- */
- class PrivateMessage
- {
- /**
- * @ORM\Id
- * @ORM\GeneratedValue
- * @ORM\Column(type="integer")
- */
- private $id;
- /**
- * @ORM\Column(type="string", length=255)
- */
- private $text;
- /**
- * @ORM\ManyToOne(targetEntity=PrivateDiscussion::class, inversedBy="privateMessages")
- * @ORM\JoinColumn(nullable=false)
- */
- private $privateDiscussion;
- /**
- * @ORM\ManyToOne(targetEntity=User::class, inversedBy="privateMessages")
- * @ORM\JoinColumn(nullable=false)
- */
- private $sender;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getText(): ?string
- {
- return $this->text;
- }
- public function setText(string $text): self
- {
- $this->text = $text;
- return $this;
- }
- public function getPrivateDiscussion(): ?PrivateDiscussion
- {
- return $this->privateDiscussion;
- }
- public function setPrivateDiscussion(?PrivateDiscussion $privateDiscussion): self
- {
- $this->privateDiscussion = $privateDiscussion;
- return $this;
- }
- public function getSender(): ?User
- {
- return $this->sender;
- }
- public function setSender(?User $sender): self
- {
- $this->sender = $sender;
- return $this;
- }
- }
|