<?php
namespace App\AtechNet\CoreBundle\Entity;
use App\AtechNet\CoreBundle\Helper\SortableEntityInterface;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\MappedSuperclass;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Entity
*
* @MappedSuperclass
*/
abstract class AbstractSortableEntity extends AbstractEntity implements SortableEntityInterface
{
/**
* @var integer
*
* @Assert\NotNull
*
* @Column(name="sort_index", type="integer")
*/
private $sortIndex = -1;
/**
* @return int
*/
public function getSortIndex()
{
return $this->sortIndex;
}
/**
* @param int $sortIndex
*/
public function setSortIndex($sortIndex)
{
$this->sortIndex = $sortIndex;
}
}