File: /home/timetracker.panomity.com/tm.old/Entity/TaskComment.php
<?php
declare(strict_types=1);
/*
* This file is part of the TaskManagementBundle for Kimai 2.
* All rights reserved by Kevin Papst (www.kevinpapst.de).
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace KimaiPlugin\TaskManagementBundle\Entity;
use App\Entity\CommentInterface;
use App\Entity\CommentTableTypeTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="kimai2_tasks_comments",
* indexes={
* @ORM\Index(columns={"task_id"})
* }
* )
*/
class TaskComment implements CommentInterface
{
use CommentTableTypeTrait;
/**
* @var Task
*
* @ORM\ManyToOne(targetEntity="KimaiPlugin\TaskManagementBundle\Entity\Task")
* @ORM\JoinColumn(onDelete="CASCADE", nullable=false)
* @Assert\NotNull()
*/
private $task;
public function setTask(Task $task): void
{
$this->task = $task;
}
public function getTask(): ?Task
{
return $this->task;
}
}