<?phpnamespace App\Entity;use App\Repository\FreelancerCommentRepository;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;/** * @ORM\Entity(repositoryClass=FreelancerCommentRepository::class) */class FreelancerComment{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Freelancer::class, inversedBy="comments") * @ORM\JoinColumn(nullable=false) */ private $freelancer; /** * @ORM\Column(type="datetime") * @Gedmo\Timestampable(on="update") */ private $updatedAt; /** * @ORM\Column(type="text") */ private $comment; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) * @Gedmo\Blameable(on="create") */ private $author; public function getLabel(): ?string { return $this->getFreelancer()->getLabel().' comment #'.$this->getId(); } public function getId(): ?int { return $this->id; } public function getFreelancer(): ?Freelancer { return $this->freelancer; } public function setFreelancer(?Freelancer $freelancer): self { $this->freelancer = $freelancer; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getComment(): ?string { return $this->comment; } public function setComment(string $comment): self { $this->comment = $comment; return $this; } public function getAuthor(): ?User { return $this->author; } public function setAuthor(?User $author): self { $this->author = $author; return $this; }}