src/Entity/Forum/Post.php line 13
<?php
namespace App\Entity\Forum;
use App\Entity\Traits\TrackerFields;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserUpdatedInterface;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'forum_post')]
#[ORM\Entity(repositoryClass: 'App\Repository\Forum\PostRepository')]
#[ORM\HasLifecycleCallbacks]
class Post implements UserCreatedInterface, UserUpdatedInterface
{
use TrackerFields;
public const ADMIN_PER_PAGE = 10;
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $text;
/**
* @var Thread
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Forum\Thread', inversedBy: 'messages', cascade: ['persist'])]
#[ORM\JoinColumn(nullable: false)]
private $thread;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getText(): ?string
{
return $this->text;
}
/**
* @param string|null $text
*/
public function setText(?string $text): void
{
$this->text = $text;
}
/**
* @return Thread
*/
public function getThread(): Thread
{
return $this->thread;
}
/**
* @param Thread $thread
*/
public function setThread(Thread $thread): void
{
$this->thread = $thread;
}
}