<?php
namespace App\Entity;
use App\Repository\SuggestionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SuggestionRepository::class)
*/
class Suggestion
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=Proposition::class, inversedBy="suggestions")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $proposition;
/**
* @ORM\ManyToOne(targetEntity=GroupSuggestion::class, inversedBy="suggestions")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $groupsuggestion;
public function __construct()
{
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getProposition(): ?Proposition
{
return $this->proposition;
}
public function setProposition(?Proposition $proposition): self
{
$this->proposition = $proposition;
return $this;
}
public function getGroupsuggestion(): ?GroupSuggestion
{
return $this->groupsuggestion;
}
public function setGroupsuggestion(?GroupSuggestion $groupsuggestion): self
{
$this->groupsuggestion = $groupsuggestion;
return $this;
}
}