<?phpnamespace App\Entity;use App\Repository\CommentRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=CommentRepository::class) */class Comment{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $author; /** * @ORM\Column(type="string", length=128) */ private $ipAddr; /** * @ORM\Column(type="text") */ private $text; /** * @ORM\Column(type="datetime") */ private $dateCreate; /** * @ORM\Column(type="integer") */ private $rating; public function __construct() { $this->dateCreate = new \DateTime(); $this->rating = 0; } public function getId(): ?int { return $this->id; } public function getAuthor(): ?string { return $this->author; } public function setAuthor(string $author): self { $this->author = $author; return $this; } public function getIpAddr(): ?string { return $this->ipAddr; } public function setIpAddr(string $ipAddr): self { $this->ipAddr = $ipAddr; return $this; } public function getText(): ?string { return $this->text; } public function setText(string $text): self { $this->text = $text; return $this; } public function getDateCreate(): ?\DateTimeInterface { return $this->dateCreate; } public function setDateCreate(\DateTimeInterface $dateCreate): self { $this->dateCreate = $dateCreate; return $this; } public function getRating(): ?int { return $this->rating; } public function setRating(int $rating): self { $this->rating = $rating; return $this; }}