<?phpnamespace AdminBundle\Entity;use DateTime;use Doctrine\ORM\Mapping as ORM;/** * Answer */#[ORM\Table(name: 'answers')]#[ORM\Entity(repositoryClass: \AdminBundle\Repository\AnswerRepository::class)]class Answer{ /** * @var int */ #[ORM\Column(name: 'id', type: 'integer')] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] private $id; /** * @var Question */ #[ORM\JoinColumn(name: 'question_id', referencedColumnName: 'id')] #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Question::class, inversedBy: 'answers', cascade: ['all'])] private $question; /** * @var Driver */ #[ORM\JoinColumn(name: 'driver_id', referencedColumnName: 'id')] #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Driver::class, inversedBy: 'answers', cascade: ['all'])] private $driver; /** * @var bool */ #[ORM\Column(name: 'value', type: 'boolean')] private $value; /** * @var DateTime */ #[ORM\Column(name: 'created_at', type: 'datetime')] private $createdAt; public function __construct() { $this->createdAt = new DateTime(); } /** * @return int */ public function getId() { return $this->id; } /** * @return Question */ public function getQuestion() { return $this->question; } /** * @param Question $question * * @return Answer */ public function setQuestion(Question $question = null) { $this->question = $question; return $this; } /** * @return Driver */ public function getDriver() { return $this->driver; } /** * @param Driver $driver * * @return Answer */ public function setDriver(Driver $driver) { $this->driver = $driver; return $this; } /** * @return bool */ public function getValue() { return $this->value; } /** * @param bool $value * * @return Answer */ public function setValue($value) { $this->value = $value; return $this; } /** * @return DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @param DateTime $createdAt * * @return Answer */ public function setCreatedAt(DateTime $createdAt) { $this->createdAt = $createdAt; return $this; }}