2015-06-01 00:39:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Skobkin\Bundle\PointToolsBundle\Entity\Blogs;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
/**
|
2017-11-06 02:36:32 +00:00
|
|
|
* @ORM\Table(name="tags", schema="posts")
|
2017-01-12 22:58:52 +00:00
|
|
|
* @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\TagRepository", readOnly=true)
|
2015-06-01 00:39:14 +00:00
|
|
|
*/
|
|
|
|
class Tag
|
|
|
|
{
|
|
|
|
/**
|
2017-01-12 22:58:52 +00:00
|
|
|
* @var int
|
2015-06-01 00:39:14 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="id", type="integer")
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
2016-03-26 21:33:55 +00:00
|
|
|
* @ORM\Column(name="text", type="text", unique=true)
|
2015-06-01 00:39:14 +00:00
|
|
|
*/
|
|
|
|
private $text;
|
|
|
|
|
|
|
|
|
2017-01-12 22:58:52 +00:00
|
|
|
public function __construct(string $text)
|
2015-10-26 02:57:53 +00:00
|
|
|
{
|
|
|
|
$this->text = $text;
|
|
|
|
}
|
|
|
|
|
2017-01-12 22:58:52 +00:00
|
|
|
public function getId(): int
|
2015-06-01 00:39:14 +00:00
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
2017-01-12 22:58:52 +00:00
|
|
|
public function getText(): string
|
2015-06-01 00:39:14 +00:00
|
|
|
{
|
|
|
|
return $this->text;
|
|
|
|
}
|
|
|
|
}
|