src/Entity/ChatSession.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChatSessionRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassChatSessionRepository::class)]
  7. class ChatSession
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'chatSessions')]
  14.     private ?User $sender null;
  15.     #[ORM\ManyToOne(inversedBy'chatSessions')]
  16.     private ?Evenement $session null;
  17.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  18.     private ?string $message null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $createdAt null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $senderRole null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $attachment null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $attachmentOriginalName null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getSender(): ?User
  32.     {
  33.         return $this->sender;
  34.     }
  35.     public function setSender(?User $sender): self
  36.     {
  37.         $this->sender $sender;
  38.         return $this;
  39.     }
  40.     public function getSession(): ?Evenement
  41.     {
  42.         return $this->session;
  43.     }
  44.     public function setSession(?Evenement $session): self
  45.     {
  46.         $this->session $session;
  47.         return $this;
  48.     }
  49.     public function getMessage(): ?string
  50.     {
  51.         return $this->message;
  52.     }
  53.     public function setMessage(?string $message): self
  54.     {
  55.         $this->message $message;
  56.         return $this;
  57.     }
  58.     public function getCreatedAt(): ?\DateTimeInterface
  59.     {
  60.         return $this->createdAt;
  61.     }
  62.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  63.     {
  64.         $this->createdAt $createdAt;
  65.         return $this;
  66.     }
  67.     public function getSenderRole(): ?string
  68.     {
  69.         return $this->senderRole;
  70.     }
  71.     public function setSenderRole(?string $senderRole): self
  72.     {
  73.         $this->senderRole $senderRole;
  74.         return $this;
  75.     }
  76.     public function getAttachment(): ?string { return $this->attachment; }
  77.     public function setAttachment(?string $attachment): self $this->attachment $attachment; return $this; }
  78.     public function getAttachmentOriginalName(): ?string { return $this->attachmentOriginalName; }
  79.     public function setAttachmentOriginalName(?string $attachmentOriginalName): self
  80.     {
  81.         $this->attachmentOriginalName $attachmentOriginalName;
  82.         return $this;
  83.     }
  84. }