src/Entity/Discution.php line 11

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