83 lines
1.3 KiB
PHP
83 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use DateTimeInterface;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* @ORM\Entity(repositoryClass="App\Repository\CommentRepository")
|
|
*/
|
|
class Comment {
|
|
/**
|
|
* @ORM\Id()
|
|
* @ORM\GeneratedValue()
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Owner", inversedBy="text")
|
|
*/
|
|
private $owner;
|
|
|
|
/**
|
|
* @ORM\Column(type="text")
|
|
*/
|
|
private $text;
|
|
|
|
/**
|
|
* @ORM\Column(type="datetime")
|
|
*/
|
|
private $createdAt;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Poll", inversedBy="comments")
|
|
*/
|
|
private $poll;
|
|
|
|
public function getId(): ?int {
|
|
return $this->id;
|
|
}
|
|
|
|
public function getOwner(): ?Owner {
|
|
return $this->owner;
|
|
}
|
|
|
|
public function setOwner( ?Owner $owner ): self {
|
|
$this->owner = $owner;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getText(): ?string {
|
|
return $this->text;
|
|
}
|
|
|
|
public function setText( string $text ): self {
|
|
$this->text = $text;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedAt(): ?DateTimeInterface {
|
|
return $this->createdAt;
|
|
}
|
|
|
|
public function setCreatedAt( DateTimeInterface $createdAt ): self {
|
|
$this->createdAt = $createdAt;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPoll(): ?Poll {
|
|
return $this->poll;
|
|
}
|
|
|
|
public function setPoll( ?Poll $poll ): self {
|
|
$this->poll = $poll;
|
|
|
|
return $this;
|
|
}
|
|
}
|