src/Entity/ReseauSociaux/Message.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ReseauSociaux;
  3. use App\Entity\Company;
  4. use App\Entity\User;
  5. use App\Repository\ReseauSociaux\MessageRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass=MessageRepository::class)
  10.  */
  11. class Message
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      * @Groups("message:read")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="messages")
  22.      * @Groups("message:read")
  23.      */
  24.     private $sender;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="messages")
  27.      * @Groups("message:read")
  28.      */
  29.     private $conversation;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      * @Groups("message:read")
  33.      */
  34.     private $content;
  35.     /**
  36.      * @ORM\Column(type="datetime")
  37.      * @Groups("message:read")
  38.      */
  39.     private $sendedAt;
  40.     /**
  41.      * @ORM\Column(type="boolean")
  42.      * @Groups("message:read")
  43.      */
  44.     private $isSenderDeleteThis;
  45.     /**
  46.      * @ORM\Column(type="boolean")
  47.      * @Groups("message:read")
  48.      */
  49.     private $isRecipientDeleteThis;
  50.     /**
  51.      * @ORM\Column(type="boolean", nullable=true)
  52.      */
  53.     private $isClicked;
  54.     /**
  55.      * @ORM\Column(type="boolean")
  56.      * @Groups("message:read")
  57.      */
  58.     private $is_read;
  59.     /**
  60.      * @ORM\Column(type="string", length=50, nullable=true)
  61.      * @Groups("message:read")
  62.      */
  63.     private $fichier;
  64.     /**
  65.      * @Groups("message:read")
  66.      */
  67.     private $mine;
  68.     /**
  69.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="messages")
  70.      * @Groups("message:read")
  71.      */
  72.     private $senderComp;
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getSender(): ?User
  78.     {
  79.         return $this->sender;
  80.     }
  81.     public function setSender(?User $sender): self
  82.     {
  83.         $this->sender $sender;
  84.         return $this;
  85.     }
  86.     public function getConversation(): ?Conversation
  87.     {
  88.         return $this->conversation;
  89.     }
  90.     public function setConversation(?Conversation $conversation): self
  91.     {
  92.         $this->conversation $conversation;
  93.         return $this;
  94.     }
  95.     public function getContent(): ?string
  96.     {
  97.         return $this->content;
  98.     }
  99.     public function setContent(string $content): self
  100.     {
  101.         $this->content $content;
  102.         return $this;
  103.     }
  104.     public function getSendedAt(): ?\DateTimeInterface
  105.     {
  106.         return $this->sendedAt;
  107.     }
  108.     public function setSendedAt(\DateTimeInterface $sendedAt): self
  109.     {
  110.         $this->sendedAt $sendedAt;
  111.         return $this;
  112.     }
  113.     public function getIsSenderDeleteThis(): ?bool
  114.     {
  115.         return $this->isSenderDeleteThis;
  116.     }
  117.     public function setIsSenderDeleteThis(bool $isSenderDeleteThis): self
  118.     {
  119.         $this->isSenderDeleteThis $isSenderDeleteThis;
  120.         return $this;
  121.     }
  122.     public function getIsRecipientDeleteThis(): ?bool
  123.     {
  124.         return $this->isRecipientDeleteThis;
  125.     }
  126.     public function setIsRecipientDeleteThis(bool $isRecipientDeleteThis): self
  127.     {
  128.         $this->isRecipientDeleteThis $isRecipientDeleteThis;
  129.         return $this;
  130.     }
  131.     public function getIsRead(): ?bool
  132.     {
  133.         return $this->is_read;
  134.     }
  135.     public function setIsRead(bool $is_read): self
  136.     {
  137.         $this->is_read $is_read;
  138.         return $this;
  139.     }
  140.     public function getFichier(): ?string
  141.     {
  142.         return $this->fichier;
  143.     }
  144.     public function setFichier(?string $fichier): self
  145.     {
  146.         $this->fichier $fichier;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return mixed
  151.      */
  152.     public function getMine()
  153.     {
  154.         return $this->mine;
  155.     }
  156.     /**
  157.      * @param mixed $mine
  158.      */
  159.     public function setMine($mine): void
  160.     {
  161.         $this->mine $mine;
  162.     }
  163.     public function getIsClicked(): ?bool
  164.     {
  165.         return $this->isClicked;
  166.     }
  167.     public function setIsClicked(?bool $isClicked): self
  168.     {
  169.         $this->isClicked $isClicked;
  170.         return $this;
  171.     }
  172.     public function getSenderComp(): ?Company
  173.     {
  174.         return $this->senderComp;
  175.     }
  176.     public function setSenderComp(?Company $senderComp): self
  177.     {
  178.         $this->senderComp $senderComp;
  179.         return $this;
  180.     }
  181. }