src/Entity/Messagerie.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MessagerieRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Uid\Uuid;
  6. /**
  7.  * @ORM\Entity(repositoryClass=MessagerieRepository::class)
  8.  */
  9. class Messagerie
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $uuid;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $token;
  25.     /**
  26.      * @ORM\Column(type="boolean", nullable=true)
  27.      */
  28.     private $statut false;
  29.     /**
  30.      * @ORM\Column(type="datetime_immutable", nullable=true)
  31.      */
  32.     private $createdAt;
  33.     /**
  34.      * @ORM\Column(type="datetime", nullable=true)
  35.      */
  36.     private $updatedAt;
  37.     /**
  38.      * @ORM\Column(type="text", nullable=true)
  39.      */
  40.     private $message;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="emetteur")
  43.      */
  44.     private $emetteur;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="destinataire")
  47.      */
  48.     private $destinataire;
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private $readAt;
  53.     /**
  54.      * @ORM\Column(type="boolean", nullable=true)
  55.      */
  56.     private $supp false;
  57.     public $position false;
  58.     /**
  59.      * @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="messageries")
  60.      */
  61.     private $conversation;
  62.     public function __construct()
  63.     {
  64.         $this->uuid Uuid::v4();
  65.     }
  66.     public function getId(): ?int
  67.     {
  68.         return $this->id;
  69.     }
  70.     public function getUuid(): ?string
  71.     {
  72.         return $this->uuid;
  73.     }
  74.     public function setUuid(?string $uuid): self
  75.     {
  76.         $this->uuid $uuid;
  77.         return $this;
  78.     }
  79.     public function getToken(): ?string
  80.     {
  81.         return $this->token;
  82.     }
  83.     public function setToken(?string $token): self
  84.     {
  85.         $this->token $token;
  86.         return $this;
  87.     }
  88.     public function isStatut(): ?bool
  89.     {
  90.         return $this->statut;
  91.     }
  92.     public function setStatut(?bool $statut): self
  93.     {
  94.         $this->statut $statut;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeImmutable
  98.     {
  99.         return $this->createdAt;
  100.     }
  101.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  102.     {
  103.         $this->createdAt $createdAt;
  104.         return $this;
  105.     }
  106.     public function getUpdatedAt(): ?\DateTimeInterface
  107.     {
  108.         return $this->updatedAt;
  109.     }
  110.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  111.     {
  112.         $this->updatedAt $updatedAt;
  113.         return $this;
  114.     }
  115.     public function getMessage(): ?string
  116.     {
  117.         return $this->message;
  118.     }
  119.     public function setMessage(?string $message): self
  120.     {
  121.         $this->message $message;
  122.         return $this;
  123.     }
  124.     public function getEmetteur(): ?User
  125.     {
  126.         return $this->emetteur;
  127.     }
  128.     public function setEmetteur(?User $emetteur): self
  129.     {
  130.         $this->emetteur $emetteur;
  131.         return $this;
  132.     }
  133.     public function getDestinataire(): ?User
  134.     {
  135.         return $this->destinataire;
  136.     }
  137.     public function setDestinataire(?User $destinataire): self
  138.     {
  139.         $this->destinataire $destinataire;
  140.         return $this;
  141.     }
  142.     public function getReadAt(): ?\DateTimeInterface
  143.     {
  144.         return $this->readAt;
  145.     }
  146.     public function setReadAt(?\DateTimeInterface $readAt): self
  147.     {
  148.         $this->readAt $readAt;
  149.         return $this;
  150.     }
  151.     public function isSupp(): ?bool
  152.     {
  153.         return $this->supp;
  154.     }
  155.     public function setSupp(?bool $supp): self
  156.     {
  157.         $this->supp $supp;
  158.         return $this;
  159.     }
  160.     public function getConversation(): ?Conversation
  161.     {
  162.         return $this->conversation;
  163.     }
  164.     public function setConversation(?Conversation $conversation): self
  165.     {
  166.         $this->conversation $conversation;
  167.         return $this;
  168.     }
  169. }