src/Entity/Suggestion.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SuggestionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=SuggestionRepository::class)
  7.  */
  8. class Suggestion
  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 $createdAt;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Proposition::class, inversedBy="suggestions")
  22.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  23.      */
  24.     private $proposition;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=GroupSuggestion::class, inversedBy="suggestions")
  27.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  28.      */
  29.     private $groupsuggestion;
  30.     public function __construct()
  31.     {
  32.         $this->createdAt = new \DateTime();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getCreatedAt(): ?\DateTimeInterface
  39.     {
  40.         return $this->createdAt;
  41.     }
  42.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  43.     {
  44.         $this->createdAt $createdAt;
  45.         return $this;
  46.     }
  47.     public function getProposition(): ?Proposition
  48.     {
  49.         return $this->proposition;
  50.     }
  51.     public function setProposition(?Proposition $proposition): self
  52.     {
  53.         $this->proposition $proposition;
  54.         return $this;
  55.     }
  56.     public function getGroupsuggestion(): ?GroupSuggestion
  57.     {
  58.         return $this->groupsuggestion;
  59.     }
  60.     public function setGroupsuggestion(?GroupSuggestion $groupsuggestion): self
  61.     {
  62.         $this->groupsuggestion $groupsuggestion;
  63.         return $this;
  64.     }
  65. }