src/Entity/Message.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MessageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=MessageRepository::class)
  7.  */
  8. class Message
  9. {
  10.     /**
  11.      * @ORM\ManyToOne(targetEntity="\App\Entity\AppUser")
  12.      */
  13.     private $user;
  14.     
  15.     /**
  16.      * @ORM\ManyToOne(targetEntity="\App\Entity\Conversation")
  17.      */
  18.     private $conversation;
  19.     
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @ORM\Column(type="text", nullable=true)
  28.      */
  29.     private $contenu;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $laDate;
  34.     
  35.     public function __construct()
  36.           {
  37.               $this->laDate = new \DateTime();
  38.           }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getContenu(): ?string
  44.     {
  45.         return $this->contenu;
  46.     }
  47.     public function setContenu(?string $contenu): self
  48.     {
  49.         $this->contenu $contenu;
  50.         return $this;
  51.     }
  52.     public function getLaDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->laDate;
  55.     }
  56.     public function setLaDate(?\DateTimeInterface $laDate): self
  57.     {
  58.         $this->laDate $laDate;
  59.         return $this;
  60.     }
  61.     public function getUser(): ?AppUser
  62.     {
  63.         return $this->user;
  64.     }
  65.     public function setUser(?AppUser $user): self
  66.     {
  67.         $this->user $user;
  68.         return $this;
  69.     }
  70.     public function getConversation(): ?Conversation
  71.     {
  72.         return $this->conversation;
  73.     }
  74.     public function setConversation(?Conversation $conversation): self
  75.     {
  76.         $this->conversation $conversation;
  77.         return $this;
  78.     }
  79. }