src/Entity/Message.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Symfony\Component\Uid\Uuid;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\MessageRepository;
  6. /**
  7.  * @ORM\Entity(repositoryClass=MessageRepository::class)
  8.  */
  9. class Message
  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="string", length=255, nullable=true)
  27.      */
  28.     private $nom;
  29.     /**
  30.      * @ORM\Column(type="boolean", nullable=true)
  31.      */
  32.     private $first;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable", nullable=true)
  35.      */
  36.     private $createdAt;
  37.     /**
  38.      * @ORM\Column(type="datetime", nullable=true)
  39.      */
  40.     private $updatedAt;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="messages")
  43.      */
  44.     private $user;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=Sujet::class, inversedBy="messages")
  47.      */
  48.     private $sujet;
  49.     public function __construct()
  50.     {
  51.         $this->uuid Uuid::v4();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getUuid(): ?string
  58.     {
  59.         return $this->uuid;
  60.     }
  61.     public function setUuid(?string $uuid): self
  62.     {
  63.         $this->uuid $uuid;
  64.         return $this;
  65.     }
  66.     public function getToken(): ?string
  67.     {
  68.         return $this->token;
  69.     }
  70.     public function setToken(?string $token): self
  71.     {
  72.         $this->token $token;
  73.         return $this;
  74.     }
  75.     public function getNom(): ?string
  76.     {
  77.         return $this->nom;
  78.     }
  79.     public function setNom(?string $nom): self
  80.     {
  81.         $this->nom $nom;
  82.         return $this;
  83.     }
  84.     public function isFirst(): ?bool
  85.     {
  86.         return $this->first;
  87.     }
  88.     public function setFirst(?bool $first): self
  89.     {
  90.         $this->first $first;
  91.         return $this;
  92.     }
  93.     public function getCreatedAt(): ?\DateTimeImmutable
  94.     {
  95.         return $this->createdAt;
  96.     }
  97.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  98.     {
  99.         $this->createdAt $createdAt;
  100.         return $this;
  101.     }
  102.     public function getUpdatedAt(): ?\DateTimeInterface
  103.     {
  104.         return $this->updatedAt;
  105.     }
  106.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  107.     {
  108.         $this->updatedAt $updatedAt;
  109.         return $this;
  110.     }
  111.     public function getUser(): ?User
  112.     {
  113.         return $this->user;
  114.     }
  115.     public function setUser(?User $user): self
  116.     {
  117.         $this->user $user;
  118.         return $this;
  119.     }
  120.     public function getSujet(): ?Sujet
  121.     {
  122.         return $this->sujet;
  123.     }
  124.     public function setSujet(?Sujet $sujet): self
  125.     {
  126.         $this->sujet $sujet;
  127.         return $this;
  128.     }
  129. }