point-tools/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php

75 lines
1.2 KiB
PHP
Raw Normal View History

<?php
namespace Skobkin\Bundle\PointToolsBundle\Entity\Blogs;
use Doctrine\ORM\Mapping as ORM;
/**
* Tag
*
* @ORM\Table(name="tags", schema="posts", indexes={
* @ORM\Index(name="idx_tag_text", columns={"text"})
* })
* @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\TagRepository")
*/
class Tag
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="text", type="text", unique=true)
*/
private $text;
/**
* @param string $text
*/
public function __construct($text)
{
$this->text = $text;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set text
*
* @param string $text
* @return Tag
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
}