<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\ReviewRepository")
*
* @ORM\Table(name="review")
*/
class Review
{
/**
* @ORM\Id
*
* @ORM\Column(type="bigint")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\OneToOne(targetEntity="App\Entity\User")
*
* @ORM\JoinColumn(name="user", referencedColumnName="id")
*/
protected $user;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $comment;
/**
* @ORM\Column(type="integer")
*/
protected $note;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $answer;
/**
* @ORM\Column(type="boolean")
*/
protected $published;
/**
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(type="datetime", name="created_at")
*/
protected $createdAt;
/**
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(type="datetime", name="updated_at")
*/
protected $updatedAt;
public function __construct()
{
$this->published = false;
}
public function getId()
{
return $this->id;
}
public function getUser()
{
return $this->user;
}
public function setUser($user): void
{
$this->user = $user;
}
public function getComment()
{
return $this->comment;
}
public function setComment($comment): void
{
$this->comment = $comment;
}
public function getNote()
{
return $this->note;
}
public function setNote($note): void
{
$this->note = $note;
}
public function getAnswer()
{
return $this->answer;
}
public function setAnswer($answer): void
{
$this->answer = $answer;
}
public function isPublished()
{
return $this->published;
}
public function setPublished($published): void
{
$this->published = $published;
}
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt(\DateTime $createdAt): void
{
$this->createdAt = $createdAt;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTime $updatedAt): void
{
$this->updatedAt = $updatedAt;
}
}